From 3f6cef4548f52b8ecb209c8171c3865811db0a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Mon, 6 Jan 2025 10:53:11 +0100 Subject: [PATCH 1/9] [test] Remove deprecated mocha and karma test scripts and update readme --- .circleci/config.yml | 36 +-------------- package.json | 12 ++--- scripts/test.mjs | 34 --------------- test/README.md | 102 +++++++++---------------------------------- 4 files changed, 26 insertions(+), 158 deletions(-) delete mode 100644 scripts/test.mjs diff --git a/.circleci/config.yml b/.circleci/config.yml index c6f07bfb6b..bc2f410194 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -151,7 +151,7 @@ jobs: react-version: << parameters.react-version >> - run: name: Run tests on JSDOM - command: pnpm test:jsdom --coverage --project @base-ui-components/react --project docs + command: pnpm test:jsdom:coverage - run: name: Check if coverage report is generated command: | @@ -290,7 +290,7 @@ jobs: browsers: true - run: name: Run tests on headless Chromium - command: pnpm test:chromium --coverage --project @base-ui-components/react --project docs + command: pnpm test:chromium:coverage - run: name: Check if coverage report is generated command: | @@ -308,32 +308,6 @@ jobs: # hardcoded in karma-webpack path: /tmp/_karma_webpack_ destination: artifact-file - test_profile: - <<: *default-job - docker: - - image: mcr.microsoft.com/playwright:v1.49.1-noble - steps: - - checkout - - install_js: - react-version: << parameters.react-version >> - browsers: true - - run: - name: Tests real browsers - # Run a couple of times for a better sample. - # TODO: hack something together where we can compile once and run multiple times e.g. by abusing watchmode. - command: | - # Running on chrome only since actual times are innaccurate anyway - # The other reason is that browserstack allows little concurrency so it's likely that we're starving other runs. - pnpm test:karma:profile --browsers chrome,chromeHeadless - pnpm test:karma:profile --browsers chrome,chromeHeadless - pnpm test:karma:profile --browsers chrome,chromeHeadless - pnpm test:karma:profile --browsers chrome,chromeHeadless - pnpm test:karma:profile --browsers chrome,chromeHeadless - # Persist reports for inspection in https://mui-dashboard.netlify.app/ - - store_artifacts: - # see karma.conf.profile.js reactProfilerReporter.outputDir - path: tmp/react-profiler-report/karma - destination: react-profiler-report/karma test_regressions: <<: *default-job docker: @@ -430,12 +404,6 @@ workflows: <<: *default-context requires: - checkout - profile: - when: - equal: [profile, << pipeline.parameters.workflow >>] - jobs: - - test_profile: - <<: *default-context react-17: triggers: - schedule: diff --git a/package.json b/package.json index d800820788..1e7e8452dc 100644 --- a/package.json +++ b/package.json @@ -33,27 +33,21 @@ "size:snapshot": "node --max-old-space-size=4096 ./scripts/sizeSnapshot/create", "size:why": "pnpm size:snapshot --analyze", "start": "pnpm install && pnpm docs:dev", - "test": "node scripts/test.mjs", - "tc": "node test/cli.js", - "test:extended": "pnpm eslint && pnpm typescript && pnpm test:coverage", - "test:coverage": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=text mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'", - "test:coverage:ci": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'", - "test:coverage:html": "cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=html mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'", + "test": "pnpm test:chromium", "test:e2e": "cross-env NODE_ENV=production pnpm test:e2e:build && concurrently --success first --kill-others \"pnpm test:e2e:run\" \"pnpm test:e2e:server\"", "test:e2e:build": "vite build --config test/e2e/vite.config.mjs", "test:e2e:dev": "vite --config test/e2e/vite.config.mjs -l info", "test:e2e:run": "cross-env VITEST_ENV=chromium vitest --project e2e", "test:e2e:server": "serve test/e2e -p 5173", - "test:karma": "cross-env NODE_ENV=test karma start test/karma.conf.js", - "test:karma:profile": "cross-env NODE_ENV=test karma start test/karma.conf.profile.js", "test:regressions": "cross-env NODE_ENV=production pnpm test:regressions:build && concurrently --success first --kill-others \"pnpm test:regressions:run\" \"pnpm test:regressions:server\"", "test:regressions:build": "vite build --config test/regressions/vite.config.mjs", "test:regressions:dev": "vite --config test/regressions/vite.config.mjs", "test:regressions:run": "cross-env VITEST_ENV=chromium vitest --project regressions", "test:regressions:server": "serve test/regressions -p 5173", - "test:unit": "cross-env NODE_ENV=test mocha 'packages/**/*.test.{js,ts,tsx}' 'docs/**/*.test.{js,ts,tsx}'", "test:jsdom": "cross-env NODE_ENV=test VITEST_ENV=jsdom vitest --project @base-ui-components/react --project docs", + "test:jsdom:coverage": "pnpm test:jsdom -- --coverage", "test:chromium": "cross-env NODE_ENV=test VITEST_ENV=chromium vitest --project @base-ui-components/react --project docs", + "test:chromium:coverage": "pnpm test:chromium -- --coverage", "test:firefox": "cross-env NODE_ENV=test VITEST_ENV=firefox vitest --project @base-ui-components/react --project docs", "test:argos": "node ./scripts/pushArgos.mjs", "typescript": "tsc -b tsconfig.json", diff --git a/scripts/test.mjs b/scripts/test.mjs deleted file mode 100644 index 56a43fa600..0000000000 --- a/scripts/test.mjs +++ /dev/null @@ -1,34 +0,0 @@ -/* eslint-disable no-console */ -import { spawn } from 'node:child_process'; -import chalk from 'chalk'; - -/* -This script ensures that we can use the same commands to run tests -when using pnpm as when using Yarn. -It enables to run `pnpm test` (or `pnpm t`) without any arguments, to run all tests, -or `pnpm test ` (or `pnpm t `) to run a subset of tests in watch mode. - -See https://github.com/mui/material-ui/pull/40430 for more context. -*/ - -if (process.argv.length < 3) { - console.log('Running ESLint, type checker, and unit tests...'); - spawn('pnpm', ['test:extended'], { - shell: true, - stdio: ['inherit', 'inherit', 'inherit'], - }); -} else { - console.log('Running selected tests in watch mode...'); - console.log( - chalk.yellow( - 'Note: run `pnpm tc` to have a better experience (and be able to pass in additional parameters).', - ), - ); - - console.log('cmd', ['tc', ...process.argv.slice(2)]); - - spawn('pnpm', ['tc', ...process.argv.slice(2)], { - shell: true, - stdio: ['inherit', 'inherit', 'inherit'], - }); -} diff --git a/test/README.md b/test/README.md index c26ee2aa0c..27026f21a1 100644 --- a/test/README.md +++ b/test/README.md @@ -5,7 +5,7 @@ Thanks for writing tests! Here's a quick run-down on our current setup. ## Getting started 1. Add a unit test to `packages/*/src/TheUnitInQuestion/TheUnitInQuestion.test.js` or an integration test `packages/*/test/`. -2. Run `pnpm t TheUnitInQuestion`. +2. Run `pnpm test:jsdom TheUnitInQuestion`. 3. Implement the tested behavior 4. Open a PR once the test passes or if you want somebody to review your work @@ -14,14 +14,13 @@ Thanks for writing tests! Here's a quick run-down on our current setup. - [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) - [Chai](https://www.chaijs.com/) - [Sinon](https://sinonjs.org/) -- [Mocha](https://mochajs.org/) -- [Karma](https://karma-runner.github.io/latest/index.html) +- [Vitest](https://vitest.dev/) - [Playwright](https://playwright.dev/) - [jsdom](https://github.com/jsdom/jsdom) ## Writing tests -For all unit tests, please use the return value from `@mui/internal-test-utils/createRenderer`. +For all unit tests, please use the return value of `createRenderer` from `#test-utils`. It prepares the test suite and returns a function with the same interface as [`render` from `@testing-library/react`](https://testing-library.com/docs/react-testing-library/api#render). @@ -29,8 +28,8 @@ It prepares the test suite and returns a function with the same interface as describe('test suite', () => { const { render } = createRenderer(); - test('first', () => { - render(); + test('first', async () => { + await render(); }); }); ``` @@ -42,7 +41,7 @@ In addition to the core matchers from `chai` we also use matchers from [`chai-do Deciding where to put a test is (like naming things) a hard problem: -- When in doubt, put the new test case directly in the unit test file for that component, for example `packages/react/src/Accordion/Root/AccordionRoot.test.tsx`. +- When in doubt, put the new test case directly in the unit test file for that component, for example `packages/react/src/accordion/root/AccordionRoot.test.tsx`. - If your test requires multiple components from the library create a new integration test. - If you find yourself using a lot of `data-testid` attributes or you're accessing a lot of styles consider adding a component (that doesn't require any interaction) @@ -114,53 +113,36 @@ trade-off, mainly completeness vs. speed. #### Debugging tests -If you want to debug tests with the, for example Chrome inspector (chrome://inspect) you can run `pnpm t --debug`. +If you want to debug tests with the, for example Chrome inspector (chrome://inspect) you can run `pnpm test:jsdom --debug`. Note that the test will not get executed until you start code execution in the inspector. -We have a dedicated task to use VS Code's integrated debugger to debug the currently opened test file. -Open the test you want to run and press F5 (launch "Test Current File"). +Running a browser test (`pnpm test:chromium`) locally opens a browser window that lets you set breakpoints. -#### Run the core mocha unit/integration test suite +#### Run the core unit test suite -To run all of the unit and integration tests run `pnpm test:unit` +To run all of the unit tests run `pnpm test:jsdom`. +It runs a Vitest CLI that lets you filter tests and watches for changes. -If you want to `grep` for certain tests add `-g STRING_TO_GREP` though for development we recommend `pnpm t `. - -#### Watch the core mocha unit/integration test suite - -`pnpm t ` - -First, we have the **unit test** suite. -It uses [mocha](https://mochajs.org) and a thin wrapper around `@testing-library/react`. -Here is an [example](https://github.com/mui/material-ui/blob/6d9f42a637184a3b3cb552d2591e2cf39653025d/packages/mui-material/src/Dialog/Dialog.test.js#L60-L69) with the `Dialog` component. - -Next, we have the **integration** tests. They are mostly used for components that -act as composite widgets like `Select` or `Menu`. -Here is an [example](https://github.com/mui/material-ui/blob/814fb60bbd8e500517b2307b6a297a638838ca89/packages/material-ui/test/integration/Menu.test.js#L98-L108) with the `Menu` component. - -#### Create HTML coverage reports - -`pnpm test:coverage:html` - -When running this command you should get under `coverage/index.html` a full coverage report in HTML format. This is created using [Istanbul](https://istanbul.js.org)'s HTML reporter and gives good data such as line, branch and function coverage. +If you want to run only tests from a particular file, append its name to the commandline: `pnpm test:jsdom TheUnitInQuestion` ### DOM API level -#### Run the mocha test suite using the karma runner +#### Run the test suite in the browser -`pnpm test:karma` +`pnpm test:chromium` +`pnpm test:firefox` + +Testing the components with JSDOM sometimes isn't enough, as it doesn't support all the APIs. +We need to make sure they will behave as expected with a **real DOM**. +To solve that problem we use Vitest in [browser mode](https://vitest.dev/guide/browser/). -Testing the components at the React level isn't enough; -we need to make sure they will behave as expected with a **real DOM**. -To solve that problem we use [Karma](https://github.com/karma-runner/karma), -which is almost a drop-in replacement of [jsdom](https://github.com/jsdom/jsdom). Our tests run on different browsers to increase the coverage: -- [Headless Chrome](https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md) +- [Headless Chromium](https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md) - Headless Firefox - Chrome, Safari, and Edge thanks to [BrowserStack](https://www.browserstack.com) -In development mode, if `pnpm test:karma` fails with this error "Cannot start ChromeHeadless. Can not find the binary", you can solve it by installing the missing headless browsers: `pnpm playwright install --with-deps`. +In development mode, if `pnpm test:chromium` or `pnpm test:firefox` fails with this error "Cannot start ChromeHeadless. Can not find the binary", you can solve it by installing the missing headless browsers: `pnpm playwright install --with-deps`. ##### BrowserStack @@ -196,52 +178,10 @@ Checkout the [end-to-end testing readme](./e2e/README.md) for more information. When working on the visual regression tests you can run `pnpm test:regressions:dev` in the background to constantly rebuild the views used for visual regression testing. To actually take the screenshots you can then run `pnpm test:regressions:run`. -You can pass the same arguments as you could to `mocha`. -For example, `pnpm test:regressions:run --watch --grep "docs-system-basic"` to take new screenshots of every demo in `docs/src/pages/system/basic`. You can view the screenshots in `test/regressions/screenshots/chrome`. Alternatively, you might want to open `http://localhost:5173` (while `pnpm test:regressions:dev` is running) to view individual views separately. -### Caveats - -#### Accessibility tree exclusion - -Our tests also explicitly document which parts of the queried element are included in -the accessibility (a11y) tree and which are excluded. -This check is fairly expensive which is why it is disabled when tests are run locally by default. -The rationale being that in almost all cases including or excluding elements from a query-set depending on their a11y-tree membership makes no difference. - -The queries where this does make a difference explicitly include checking for a11y tree inclusion, for example `getByRole('button', { hidden: false })` (see [byRole documentation](https://testing-library.com/docs/dom-testing-library/api-queries#byrole) for more information). -To see if your test (`test:karma` or `test:unit`) behaves the same between CI and local environment, set the environment variable `CI` to `'true'`. - -Not considering a11y tree exclusion is a common cause of "Unable to find an accessible element with the role" or "Found multiple elements with the role". - -### Performance monitoring - -We have a dedicated CI task that profiles our core test suite. -Since this task is fairly expensive and not relevant to most day-to-day work it has to be started manually. -The CircleCI docs explain [how to start a pipeline manually](https://circleci.com/docs/api/v2/#operation/triggerPipeline) in detail. -Example: -With an environment variable `$CIRCLE_TOKEN` containing a [CircleCI personal access token](https://app.circleci.com/settings/user/tokens). - -The following command triggers the `profile` workflow for the pull request #24289. - -```bash -curl --request POST \ - --url https://circleci.com/api/v2/project/gh/mui/base-ui/pipeline \ - --header 'content-type: application/json' \ - --header 'Circle-Token: $CIRCLE_TOKEN' \ - --data-raw '{"branch":"pull/24289/head","parameters":{"workflow":"profile"}}' -``` - -To analyze this profile run you can use https://mui-dashboard.netlify.app/test-profile/:job-number. - -To find out the job number you can start with the response of the previous CircleCI API request which includes the created pipeline id. -You then have to search in the [CircleCI UI](https://app.circleci.com/pipelines/github/mui/base-ui) for the job number of `test_profile` that is part of the started pipeline. -The job number can be extracted from the URL of a particular CircleCI job. - -For example, in https://app.circleci.com/pipelines/github/mui/base-ui/32796/workflows/23f946de-328e-49b7-9c94-bfe0a0248a12/jobs/211258 `jobs/211258` points to the job number which is in this case `211258` which means you want to visit https://mui-dashboard.netlify.app/test-profile/211258 to analyze the profile. - ### Testing multiple versions of React You can check integration of different versions of React (for example different [release channels](https://react.dev/community/versioning-policy) or PRs to React) by running `node scripts/useReactVersion.mjs `. From 32be83056809e7f619bc372be6120778b4410bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Mon, 6 Jan 2025 13:12:48 +0100 Subject: [PATCH 2/9] Fix coverage reporting --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1e7e8452dc..e896e1ed59 100644 --- a/package.json +++ b/package.json @@ -45,9 +45,9 @@ "test:regressions:run": "cross-env VITEST_ENV=chromium vitest --project regressions", "test:regressions:server": "serve test/regressions -p 5173", "test:jsdom": "cross-env NODE_ENV=test VITEST_ENV=jsdom vitest --project @base-ui-components/react --project docs", - "test:jsdom:coverage": "pnpm test:jsdom -- --coverage", + "test:jsdom:coverage": "pnpm test:jsdom --coverage", "test:chromium": "cross-env NODE_ENV=test VITEST_ENV=chromium vitest --project @base-ui-components/react --project docs", - "test:chromium:coverage": "pnpm test:chromium -- --coverage", + "test:chromium:coverage": "pnpm test:chromium --coverage", "test:firefox": "cross-env NODE_ENV=test VITEST_ENV=firefox vitest --project @base-ui-components/react --project docs", "test:argos": "node ./scripts/pushArgos.mjs", "typescript": "tsc -b tsconfig.json", From 81a39f1f519c2c8b02c07c6899b31052ef49cadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Mon, 6 Jan 2025 13:23:47 +0100 Subject: [PATCH 3/9] Remove karma --- .circleci/config.yml | 4 - package.json | 8 - .../eslint-plugin-material-ui/package.json | 3 - packages/react/package.json | 2 +- test/cli.js | 125 ---------- test/karma.conf.js | 223 ------------------ test/karma.conf.profile.js | 179 -------------- test/karma.tests.js | 5 - 8 files changed, 1 insertion(+), 548 deletions(-) delete mode 100644 test/cli.js delete mode 100644 test/karma.conf.js delete mode 100644 test/karma.conf.profile.js delete mode 100644 test/karma.tests.js diff --git a/.circleci/config.yml b/.circleci/config.yml index bc2f410194..b6ea58971d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -304,10 +304,6 @@ jobs: curl -Os https://uploader.codecov.io/latest/linux/codecov chmod +x codecov ./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_VERSION-browser" - - store_artifacts: - # hardcoded in karma-webpack - path: /tmp/_karma_webpack_ - destination: artifact-file test_regressions: <<: *default-job docker: diff --git a/package.json b/package.json index e896e1ed59..00ecfb6d59 100644 --- a/package.json +++ b/package.json @@ -123,14 +123,6 @@ "fs-extra": "^11.2.0", "globby": "^14.0.2", "jsonc-parser": "^3.3.1", - "karma": "^6.4.4", - "karma-browserstack-launcher": "~1.6.0", - "karma-chrome-launcher": "^3.2.0", - "karma-coverage-istanbul-reporter": "^3.0.3", - "karma-firefox-launcher": "^2.1.3", - "karma-mocha": "^2.0.1", - "karma-sourcemap-loader": "^0.4.0", - "karma-webpack": "^5.0.1", "lerna": "^8.1.9", "lodash": "^4.17.21", "markdownlint-cli2": "^0.17.1", diff --git a/packages/eslint-plugin-material-ui/package.json b/packages/eslint-plugin-material-ui/package.json index 688a3bf803..91a8625010 100644 --- a/packages/eslint-plugin-material-ui/package.json +++ b/packages/eslint-plugin-material-ui/package.json @@ -9,8 +9,5 @@ "@typescript-eslint/experimental-utils": "^5.62.0", "@typescript-eslint/parser": "^8.19.0" }, - "scripts": { - "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/eslint-plugin-material-ui/**/*.test.js' --timeout 3000" - }, "license": "MIT" } diff --git a/packages/react/package.json b/packages/react/package.json index 40241ad130..df11d92144 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -72,7 +72,7 @@ "test:package": "publint ./build && attw --pack ./build", "prebuild": "rimraf --glob build build-tests \"*.tsbuildinfo\"", "release": "pnpm build && pnpm publish", - "test": "cd ../../ && cross-env NODE_ENV=test mocha 'packages/react/**/*.test.{js,ts,tsx}'", + "test": "cross-env NODE_ENV=test VITEST_ENV=jsdom vitest", "typescript": "tsc -b tsconfig.json" }, "dependencies": { diff --git a/test/cli.js b/test/cli.js deleted file mode 100644 index 17ccfddb45..0000000000 --- a/test/cli.js +++ /dev/null @@ -1,125 +0,0 @@ -const childProcess = require('child_process'); -const fs = require('fs'); -const path = require('path'); -const glob = require('fast-glob'); -const yargs = require('yargs'); - -async function run(argv) { - const workspaceRoot = path.resolve(__dirname, '../'); - - const gitignore = fs.readFileSync(path.join(workspaceRoot, '.gitignore'), { encoding: 'utf8' }); - const ignore = gitignore - .split(/\r?\n/) - .filter((pattern) => { - return pattern.length > 0 && !pattern.startsWith('#'); - }) - .map((line) => { - if (line.startsWith('/')) { - // "/" marks the cwd of the ignore file. - // Since we declare the dirname of the gitignore the cwd we can prepend "." as a shortcut. - return `.${line}`; - } - return line; - }); - const globPattern = `**/*${argv.testFilePattern.replace(/\\/g, '/')}*`; - const spec = glob - .sync(globPattern, { - cwd: workspaceRoot, - ignore, - followSymbolicLinks: false, - }) - .filter((relativeFile) => { - return /\.test\.(js|ts|tsx)$/.test(relativeFile); - }); - - if (spec.length === 0) { - throw new Error(`Could not find any file test files matching '${globPattern}'`); - } - - const args = ['mocha'].concat(spec); - if (argv.bail) { - args.push('--bail'); - } - if (argv.debug || argv.inspecting) { - args.push('--timeout 0'); - } - if (argv.debug) { - args.push('--inspect-brk'); - } - if (!argv.single) { - args.push('--watch'); - } - if (argv.testNamePattern !== undefined) { - args.push(`--grep '${argv.testNamePattern}'`); - } - - const mochaProcess = childProcess.spawn('pnpm', args, { - env: { - ...process.env, - BABEL_ENV: 'test', - NODE_ENV: argv.production ? 'production' : 'test', - }, - shell: true, - stdio: ['inherit', 'inherit', 'inherit'], - }); - - mochaProcess.once('exit', (signal) => { - process.exit(signal !== null ? signal : undefined); - }); - - process.on('SIGINT', () => { - // Forward interrupt. - // Otherwise cli.js exits and the you get dangling console output from mocha. - // "dangling" meaning that you get mocha output in the new terminal input. - mochaProcess.kill('SIGINT'); - }); -} - -yargs - .command({ - command: '$0 ', - description: 'Test cli for developing', - builder: (command) => { - return command - .positional('testFilePattern', { - description: 'Only test files match "**/*{testFilePattern}*.test.{js,ts,tsx}"', - type: 'string', - }) - .option('bail', { - alias: 'b', - description: 'Stop on first error.', - type: 'boolean', - }) - .option('debug', { - alias: 'd', - description: - 'Allows attaching a debugger and waits for the debugger to start code execution.', - type: 'boolean', - }) - .option('inspecting', { - description: 'In case you expect to hit breakpoints that may interrupt a test.', - type: 'boolean', - }) - .option('production', { - alias: 'p', - description: - 'Run tests in production environment. WARNING: Will not work with most tests.', - type: 'boolean', - }) - .option('single', { - alias: 's', - description: 'Run only once i.e. not in watch mode.', - type: 'boolean', - }) - .option('testNamePattern', { - alias: 't', - description: 'Limit tests by their name given a pattern.', - type: 'string', - }); - }, - handler: run, - }) - .help() - .strict(true) - .version(false) - .parse(); diff --git a/test/karma.conf.js b/test/karma.conf.js deleted file mode 100644 index 85bfe50e64..0000000000 --- a/test/karma.conf.js +++ /dev/null @@ -1,223 +0,0 @@ -const path = require('path'); -const playwright = require('playwright'); -const webpack = require('webpack'); - -const CI = Boolean(process.env.CI); -// renovate PRs are based off of upstream branches. -// Their CI run will be a branch based run not PR run and therefore won't have a CIRCLE_PR_NUMBER -const isPR = Boolean(process.env.CIRCLE_PULL_REQUEST); - -let build = `Base UI local ${new Date().toISOString()}`; - -if (process.env.CIRCLECI) { - const buildPrefix = - process.env.CIRCLE_PR_NUMBER !== undefined - ? process.env.CIRCLE_PR_NUMBER - : process.env.CIRCLE_BRANCH; - build = `${buildPrefix}: ${process.env.CIRCLE_BUILD_URL}`; -} - -const browserStack = { - // |commits in PRs| >> |Merged commits|. - // Since we have limited resources on BrowserStack we often time out on PRs. - // However, BrowserStack rarely fails with a true-positive so we use it as a stop gap for release not merge. - // But always enable it locally since people usually have to explicitly have to expose their BrowserStack access key anyway. - enabled: !CI || !isPR || process.env.BROWSERSTACK_FORCE === 'true', - username: process.env.BROWSERSTACK_USERNAME, - accessKey: process.env.BROWSERSTACK_ACCESS_KEY, - build, - // https://github.com/browserstack/api#timeout300 - timeout: 5 * 60, // Maximum time before a worker is terminated. Default 5 minutes. -}; - -process.env.CHROME_BIN = playwright.chromium.executablePath(); -process.env.FIREFOX_BIN = playwright.firefox.executablePath(); - -// BrowserStack rate limit after 1600 calls every 5 minutes. -// Per second, https://www.browserstack.com/docs/automate/api-reference/selenium/introduction#rest-api-projects -const MAX_REQUEST_PER_SECOND_BROWSERSTACK = 1600 / (60 * 5); -// Estimate the max number of concurrent karma builds -// For each PR, 6 concurrent builds are used, only one is using BrowserStack. -const AVERAGE_KARMA_BUILD = 1 / 6; -// CircleCI accepts up to 83 concurrent builds. -const MAX_CIRCLE_CI_CONCURRENCY = 83; - -// Karma configuration -module.exports = async function setKarmaConfig(config) { - const { default: isWsl } = await import('is-wsl'); - - const baseConfig = { - basePath: '../', - // Firefox has issues on WSL - browsers: isWsl ? ['chromeHeadless'] : ['chromeHeadless', 'FirefoxHeadless'], - browserDisconnectTimeout: 3 * 60 * 1000, // default 2000 - browserDisconnectTolerance: 1, // default 0 - browserNoActivityTimeout: 3 * 60 * 1000, // default 30000 - colors: true, - coverageIstanbulReporter: { - combineBrowserReports: true, - dir: path.resolve(__dirname, '../coverage'), - fixWebpackSourcePaths: true, - reports: CI ? ['lcov'] : [], - skipFilesWithNoCoverage: true, - verbose: false, - }, - client: { - mocha: { - // Some BrowserStack browsers can be slow. - timeout: (process.env.CIRCLECI === 'true' ? 6 : 2) * 1000, - }, - }, - frameworks: ['mocha', 'webpack'], - files: [ - { - pattern: 'test/karma.tests.js', - watched: false, - }, - { - pattern: 'test/assets/*.png', - watched: false, - included: false, - served: true, - }, - ], - plugins: [ - 'karma-mocha', - 'karma-chrome-launcher', - 'karma-coverage-istanbul-reporter', - 'karma-sourcemap-loader', - 'karma-webpack', - 'karma-firefox-launcher', - ], - /** - * possible values: - * - config.LOG_DISABLE - * - config.LOG_ERROR - * - config.LOG_WARN - * - config.LOG_INFO - * - config.LOG_DEBUG - */ - logLevel: config.LOG_INFO, - port: 9876, - preprocessors: { - 'test/karma.tests.js': ['webpack', 'sourcemap'], - }, - proxies: { - '/fake.png': '/base/test/assets/fake.png', - '/fake2.png': '/base/test/assets/fake2.png', - }, - // The CI branch fixes double log issue - // https://github.com/karma-runner/karma/issues/2342 - reporters: ['dots', ...(CI ? ['coverage-istanbul'] : [])], - webpack: { - mode: 'development', - devtool: CI ? 'inline-source-map' : 'eval-source-map', - optimization: { - nodeEnv: 'test', - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env.CI': JSON.stringify(process.env.CI), - 'process.env.KARMA': JSON.stringify(true), - 'process.env.TEST_GATE': JSON.stringify(process.env.TEST_GATE), - }), - new webpack.ProvidePlugin({ - // required by code accessing `process.env` in the browser - process: 'process/browser.js', - }), - ], - module: { - rules: [ - { - test: /\.(js|mjs|ts|tsx)$/, - loader: 'babel-loader', - exclude: /node_modules/, - options: { - envName: 'stable', - }, - }, - // transpile 3rd party packages with dependencies in this repository - { - test: /\.(js|mjs|ts|tsx)$/, - use: { - loader: 'babel-loader', - options: { - plugins: ['babel-plugin-istanbul'], - }, - }, - enforce: 'post', - exclude: /node_modules/, - }, - ], - }, - resolve: { - extensions: ['.js', '.mjs', '.ts', '.tsx'], - fallback: { - // needed by sourcemap - fs: false, - path: false, - // Exclude polyfill and treat 'stream' as an empty module since it is not required. next -> gzip-size relies on it. - stream: false, - vm: false, - }, - }, - // TODO: 'browserslist:modern' - // See https://github.com/webpack/webpack/issues/14203 - target: 'web', - }, - customLaunchers: { - chromeHeadless: { - base: 'ChromeHeadless', - flags: ['--no-sandbox'], - }, - }, - singleRun: CI, - }; - - let newConfig = baseConfig; - - if (browserStack.enabled && browserStack.accessKey) { - newConfig = { - ...baseConfig, - browserStack, - browsers: baseConfig.browsers.concat(['chrome', 'safari', 'edge']), - plugins: baseConfig.plugins.concat(['karma-browserstack-launcher']), - customLaunchers: { - ...baseConfig.customLaunchers, - chrome: { - base: 'BrowserStack', - os: 'OS X', - os_version: 'Monterey', - browser: 'chrome', - // We support Chrome 109.x per .browserslistrc - browser_version: '109.0', - }, - safari: { - base: 'BrowserStack', - os: 'OS X', - os_version: 'Monterey', - browser: 'safari', - browser_version: '15.6', - }, - edge: { - base: 'BrowserStack', - os: 'Windows', - os_version: '10', - browser: 'edge', - browser_version: '120.0', - }, - }, - }; - - // -1 because chrome headless runs in the local machine - const browserStackBrowsersUsed = newConfig.browsers.length - 1; - - // default 1000, Avoid Rate Limit Exceeded - newConfig.browserStack.pollingTimeout = - ((MAX_CIRCLE_CI_CONCURRENCY * AVERAGE_KARMA_BUILD * browserStackBrowsersUsed) / - MAX_REQUEST_PER_SECOND_BROWSERSTACK) * - 1000; - } - - config.set(newConfig); -}; diff --git a/test/karma.conf.profile.js b/test/karma.conf.profile.js deleted file mode 100644 index ec06840bee..0000000000 --- a/test/karma.conf.profile.js +++ /dev/null @@ -1,179 +0,0 @@ -const path = require('path'); -const { chromium } = require('playwright'); -const webpack = require('webpack'); - -const workspaceRoot = path.resolve(__dirname, '../'); - -const browserStack = { - username: process.env.BROWSERSTACK_USERNAME, - accessKey: process.env.BROWSERSTACK_ACCESS_KEY, - build: `mui-core-profile-${new Date().toISOString()}`, -}; - -process.env.CHROME_BIN = chromium.executablePath(); - -// Karma configuration -module.exports = function setKarmaConfig(config) { - const baseConfig = { - basePath: '../', - browsers: ['chromeHeadless'], - browserDisconnectTimeout: 120000, // default 2000 - browserDisconnectTolerance: 1, // default 0 - browserNoActivityTimeout: 300000, // default 10000 - colors: true, - frameworks: ['mocha', 'webpack'], - files: [ - { - pattern: 'test/karma.tests.js', - watched: false, - }, - { - pattern: 'test/assets/*.png', - watched: false, - included: false, - served: true, - }, - ], - plugins: [ - 'karma-mocha', - 'karma-chrome-launcher', - 'karma-sourcemap-loader', - 'karma-webpack', - '@mui/internal-test-utils/KarmaReporterReactProfiler', - ], - /** - * possible values: - * - config.LOG_DISABLE - * - config.LOG_ERROR - * - config.LOG_WARN - * - config.LOG_INFO - * - config.LOG_DEBUG - */ - logLevel: config.LOG_INFO, - port: 9876, - preprocessors: { - 'test/karma.tests.js': ['webpack', 'sourcemap'], - }, - proxies: { - '/fake.png': '/base/test/assets/fake.png', - '/fake2.png': '/base/test/assets/fake2.png', - }, - reporters: ['dots', 'profiler'], - reactProfilerReporter: { - outputDir: path.join(workspaceRoot, 'tmp/react-profiler-report/karma'), - }, - webpack: { - // TODO: profile in production - mode: 'development', - // https://webpack.js.org/configuration/devtool/#devtool - devtool: 'eval-cheap-source-map', - optimization: { - // Helps debugging and build perf. - // Bundle size is irrelevant for local serving. - minimize: false, - // TODO: profile in production - nodeEnv: 'test', - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env.CI': JSON.stringify(process.env.CI), - 'process.env.KARMA': JSON.stringify(true), - 'process.env.TEST_GATE': JSON.stringify('enable-dispatching-profiler'), - }), - new webpack.ProvidePlugin({ - // required by code accessing `process.env` in the browser - process: 'process/browser.js', - }), - ], - module: { - rules: [ - { - test: /\.(js|ts|tsx)$/, - loader: 'babel-loader', - exclude: /node_modules/, - options: { - envName: 'stable', - }, - }, - ], - }, - resolve: { - alias: { - // "How to use profiling in production" - // https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977#react-dom1660--scheduler0100 - 'react-dom$': 'react-dom/profiling', - }, - extensions: ['.js', '.ts', '.tsx'], - fallback: { - // needed by sourcemap - fs: false, - path: false, - // Exclude polyfill and treat 'stream' as an empty module since it is not required. next -> gzip-size relies on it. - stream: false, - }, - }, - // TODO: 'browserslist:modern' - // See https://github.com/webpack/webpack/issues/14203 - target: 'web', - }, - webpackMiddleware: { - noInfo: true, - writeToDisk: Boolean(process.env.CI), - }, - customLaunchers: { - chromeHeadless: { - base: 'ChromeHeadless', - flags: ['--no-sandbox'], - }, - }, - singleRun: Boolean(process.env.CI), - }; - - let newConfig = baseConfig; - - if (browserStack.accessKey) { - newConfig = { - ...baseConfig, - browserStack, - browsers: baseConfig.browsers.concat(['chrome', 'firefox', 'safari', 'edge']), - plugins: baseConfig.plugins.concat(['karma-browserstack-launcher']), - customLaunchers: { - ...baseConfig.customLaunchers, - chrome: { - base: 'BrowserStack', - os: 'OS X', - os_version: 'Catalina', - browser: 'chrome', - // We support Chrome 109.x per .browserslistrc - browser_version: '109.0', - }, - // No accurate performance timings (integer precision instead of double). - firefox: { - base: 'BrowserStack', - os: 'Windows', - os_version: '10', - browser: 'firefox', - // We support Firefox 115.x per .browserslistrc - browser_version: '115.0', - }, - // No accurate performance timings (integer precision instead of double). - safari: { - base: 'BrowserStack', - os: 'OS X', - os_version: 'Monterey', - browser: 'safari', - browser_version: '15.6', - }, - edge: { - base: 'BrowserStack', - os: 'Windows', - os_version: '10', - browser: 'edge', - browser_version: '120.0', - }, - }, - }; - } - - config.set(newConfig); -}; diff --git a/test/karma.tests.js b/test/karma.tests.js deleted file mode 100644 index fb87a0a4cb..0000000000 --- a/test/karma.tests.js +++ /dev/null @@ -1,5 +0,0 @@ -import '@mui/internal-test-utils/init'; -import '@mui/internal-test-utils/setupKarma'; - -const baseUiUnitContext = require.context('../packages/react/src/', true, /\.test\.(js|ts|tsx)$/); -baseUiUnitContext.keys().forEach(baseUiUnitContext); From e1d4beb696d6edb633cc37ffadd2948746f92d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Mon, 6 Jan 2025 14:09:24 +0100 Subject: [PATCH 4/9] Remove mocha --- .eslintrc.js | 32 +- .mocharc.js | 27 - package.json | 3 - .../src/accordion/root/AccordionRoot.test.tsx | 6 +- .../indicator/CheckboxIndicator.test.tsx | 12 +- .../src/checkbox/root/CheckboxRoot.test.tsx | 12 +- .../collapsible/root/CollapsibleRoot.test.tsx | 6 +- .../react/src/dialog/root/DialogRoot.test.tsx | 18 +- packages/react/src/index.test.js | 1 + .../MenuCheckboxItemIndicator.test.tsx | 12 +- .../checkbox-item/MenuCheckboxItem.test.tsx | 12 +- .../react/src/menu/item/MenuItem.test.tsx | 6 +- .../menu/positioner/MenuPositioner.test.tsx | 28 +- .../MenuRadioItemIndicator.test.tsx | 12 +- .../menu/radio-item/MenuRadioItem.test.tsx | 6 +- .../react/src/menu/root/MenuRoot.test.tsx | 56 +- .../root/NumberFieldRoot.test.tsx | 6 +- .../src/number-field/utils/parse.test.ts | 6 +- .../src/popover/root/PopoverRoot.test.tsx | 12 +- .../root/PreviewCardRoot.test.tsx | 12 +- .../react/src/radio-group/RadioGroup.test.tsx | 6 +- .../radio/indicator/RadioIndicator.test.tsx | 12 +- .../react/src/select/item/SelectItem.test.tsx | 12 +- .../react/src/select/root/SelectRoot.test.tsx | 14 +- .../react/src/slider/root/SliderRoot.test.tsx | 29 +- .../react/src/switch/root/SwitchRoot.test.tsx | 6 +- .../react/src/tabs/root/TabsRoot.test.tsx | 6 +- .../src/toggle-group/ToggleGroup.test.tsx | 12 +- .../src/tooltip/root/TooltipRoot.test.tsx | 6 +- packages/react/src/utils/useId.test.tsx | 4 +- packages/react/test/describeConformance.tsx | 2 +- packages/react/tsconfig.test.json | 5 +- pnpm-lock.yaml | 723 +----------------- scripts/buildApiDocs/tsconfig.json | 2 +- test/tsconfig.json | 2 +- 35 files changed, 157 insertions(+), 969 deletions(-) delete mode 100644 .mocharc.js diff --git a/.eslintrc.js b/.eslintrc.js index ba0a13398b..ad1a0078fd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -53,8 +53,38 @@ module.exports = { }, overrides: [ ...baseline.overrides.filter( - (ruleSet) => !ruleSet.rules.hasOwnProperty('filenames/match-exported'), + (ruleSet) => + !ruleSet.rules.hasOwnProperty('filenames/match-exported') && + !ruleSet.extends?.includes('plugin:mocha/recommended'), ), + { + files: [ + // matching the pattern of the test runner + '*.test.?(c|m)[jt]s?(x)', + ], + rules: { + // disable eslint-plugin-jsx-a11y + // tests are not driven by assistive technology + // add `jsx-a11y` rules once you encounter them in tests + 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/control-has-associated-label': 'off', + 'jsx-a11y/iframe-has-title': 'off', + 'jsx-a11y/label-has-associated-control': 'off', + 'jsx-a11y/mouse-events-have-key-events': 'off', + 'jsx-a11y/no-noninteractive-tabindex': 'off', + 'jsx-a11y/no-static-element-interactions': 'off', + 'jsx-a11y/tabindex-no-positive': 'off', + + // In tests this is generally intended. + 'react/button-has-type': 'off', + // They are accessed to test custom validator implementation with PropTypes.checkPropTypes + 'react/forbid-foreign-prop-types': 'off', + // components that are defined in test are isolated enough + // that they don't need type-checking + 'react/prop-types': 'off', + 'react/no-unused-prop-types': 'off', + }, + }, { files: ['docs/src/app/(private)/experiments/**/*{.tsx,.js}'], rules: { diff --git a/.mocharc.js b/.mocharc.js deleted file mode 100644 index b5f2cab4f8..0000000000 --- a/.mocharc.js +++ /dev/null @@ -1,27 +0,0 @@ -module.exports = { - extension: ['js', 'mjs', 'ts', 'tsx'], - ignore: [ - '**/build/**', - '**/node_modules/**', - // Mocha seems to ignore .next anyway (maybe because dotfiles?). - // We're leaving this to make sure. - 'docs/.next/**', - ], - recursive: true, - timeout: (process.env.CIRCLECI === 'true' ? 5 : 2) * 1000, // Circle CI has low-performance CPUs. - reporter: 'dot', - require: [ - '@mui/internal-test-utils/setupBabel', - '@mui/internal-test-utils/setupJSDOM', - './packages/react/test/setup.ts', - ], - 'watch-ignore': [ - // default - '.git', - // node_modules can be nested with workspaces - '**/node_modules/**', - // Unrelated directories with a large number of files - '**/build/**', - 'docs/.next/**', - ], -}; diff --git a/package.json b/package.json index 00ecfb6d59..676e5d4eae 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,6 @@ "@tailwindcss/postcss": "4.0.0-beta.2", "@types/fs-extra": "^11.0.4", "@types/lodash": "^4.17.13", - "@types/mocha": "^10.0.10", "@types/node": "^18.19.69", "@types/react": "^19.0.2", "@types/url-join": "^4.0.3", @@ -114,7 +113,6 @@ "eslint-plugin-import": "^2.31.0", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-material-ui": "workspace:^", - "eslint-plugin-mocha": "^10.5.0", "eslint-plugin-react": "^7.37.3", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-testing-library": "^6.5.0", @@ -126,7 +124,6 @@ "lerna": "^8.1.9", "lodash": "^4.17.21", "markdownlint-cli2": "^0.17.1", - "mocha": "^10.8.2", "nx": "^18.3.5", "nyc": "^15.1.0", "piscina": "^4.8.0", diff --git a/packages/react/src/accordion/root/AccordionRoot.test.tsx b/packages/react/src/accordion/root/AccordionRoot.test.tsx index 6e28ffb062..3c25039372 100644 --- a/packages/react/src/accordion/root/AccordionRoot.test.tsx +++ b/packages/react/src/accordion/root/AccordionRoot.test.tsx @@ -46,11 +46,9 @@ describe('', () => { }); describe('uncontrolled', () => { - it('open state', async function test(t = {}) { + it('open state', async ({ skip }) => { if (isJSDOM) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByRole, queryByText, user } = await render( diff --git a/packages/react/src/checkbox/indicator/CheckboxIndicator.test.tsx b/packages/react/src/checkbox/indicator/CheckboxIndicator.test.tsx index 34014f11dc..cb828c893f 100644 --- a/packages/react/src/checkbox/indicator/CheckboxIndicator.test.tsx +++ b/packages/react/src/checkbox/indicator/CheckboxIndicator.test.tsx @@ -97,11 +97,9 @@ describe('', () => { }); }); - it('should remove the indicator when there is no exit animation defined', async function test(t = {}) { + it('should remove the indicator when there is no exit animation defined', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function Test() { @@ -129,11 +127,9 @@ describe('', () => { }); }); - it('should remove the indicator when the animation finishes', async function test(t = {}) { + it('should remove the indicator when the animation finishes', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; diff --git a/packages/react/src/checkbox/root/CheckboxRoot.test.tsx b/packages/react/src/checkbox/root/CheckboxRoot.test.tsx index 343c4614b9..e5b6934a0e 100644 --- a/packages/react/src/checkbox/root/CheckboxRoot.test.tsx +++ b/packages/react/src/checkbox/root/CheckboxRoot.test.tsx @@ -261,12 +261,10 @@ describe('', () => { }); }); - it('should include the checkbox value in the form submission', async function test(t = {}) { + it('should include the checkbox value in the form submission', async ({ skip }) => { if (isJSDOM) { // FormData is not available in JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } let stringifiedFormData = ''; @@ -300,12 +298,10 @@ describe('', () => { expect(stringifiedFormData).to.equal('test-checkbox=on'); }); - it('should include the custom checkbox value in the form submission', async function test(t = {}) { + it('should include the custom checkbox value in the form submission', async ({ skip }) => { if (isJSDOM) { // FormData is not available in JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } let stringifiedFormData = ''; diff --git a/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx b/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx index 178a5df134..b351484c3a 100644 --- a/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx +++ b/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx @@ -68,11 +68,9 @@ describe('', () => { expect(queryByText(PANEL_CONTENT)).to.equal(null); }); - it('uncontrolled mode', async function test(t = {}) { + it('uncontrolled mode', async ({ skip }) => { if (isJSDOM) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByRole, queryByText, user } = await render( diff --git a/packages/react/src/dialog/root/DialogRoot.test.tsx b/packages/react/src/dialog/root/DialogRoot.test.tsx index 6faa878510..09640ed511 100644 --- a/packages/react/src/dialog/root/DialogRoot.test.tsx +++ b/packages/react/src/dialog/root/DialogRoot.test.tsx @@ -53,11 +53,9 @@ describe('', () => { expect(queryByRole('dialog')).to.equal(null); }); - it('should remove the popup when there is no exit animation defined', async function test(t = {}) { + it('should remove the popup when there is no exit animation defined', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function Test() { @@ -83,11 +81,9 @@ describe('', () => { }); }); - it('should remove the popup when the animation finishes', async function test(t = {}) { + it('should remove the popup when the animation finishes', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; @@ -352,7 +348,7 @@ describe('', () => { }); }); - it('waits for the exit transition to finish before unmounting', async function test(t = {}) { + it('waits for the exit transition to finish before unmounting', async ({ skip }) => { const css = ` .dialog { opacity: 0; @@ -364,9 +360,7 @@ describe('', () => { `; if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; diff --git a/packages/react/src/index.test.js b/packages/react/src/index.test.js index 91819582bc..f723e18a2a 100644 --- a/packages/react/src/index.test.js +++ b/packages/react/src/index.test.js @@ -4,6 +4,7 @@ * import the entire lib for coverage reporting */ import { expect } from 'chai'; +import { describe, it } from 'vitest'; import * as BaseUI from './index'; describe('@base-ui-components/react', () => { diff --git a/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.test.tsx b/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.test.tsx index 3cf0825e44..f0ef4d6bdd 100644 --- a/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.test.tsx +++ b/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.test.tsx @@ -26,11 +26,9 @@ describe('', () => { }, })); - it('should remove the indicator when there is no exit animation defined', async function test(t = {}) { + it('should remove the indicator when there is no exit animation defined', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function Test() { @@ -64,11 +62,9 @@ describe('', () => { }); }); - it('should remove the indicator when the animation finishes', async function test(t = {}) { + it('should remove the indicator when the animation finishes', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; diff --git a/packages/react/src/menu/checkbox-item/MenuCheckboxItem.test.tsx b/packages/react/src/menu/checkbox-item/MenuCheckboxItem.test.tsx index d39bd9d53d..10f424f0b7 100644 --- a/packages/react/src/menu/checkbox-item/MenuCheckboxItem.test.tsx +++ b/packages/react/src/menu/checkbox-item/MenuCheckboxItem.test.tsx @@ -51,11 +51,9 @@ describe('', () => { refInstanceof: window.HTMLDivElement, })); - it('perf: does not rerender menu items unnecessarily', async function test(t = {}) { + it('perf: does not rerender menu items unnecessarily', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const renderItem1Spy = spy(); @@ -214,11 +212,9 @@ describe('', () => { expect(item).to.have.attribute('data-unchecked', ''); }); - it(`toggles the checked state when Enter is pressed`, async function test(t = {}) { + it(`toggles the checked state when Enter is pressed`, async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByRole, user } = await render( diff --git a/packages/react/src/menu/item/MenuItem.test.tsx b/packages/react/src/menu/item/MenuItem.test.tsx index a25baf0260..87ec2ffe37 100644 --- a/packages/react/src/menu/item/MenuItem.test.tsx +++ b/packages/react/src/menu/item/MenuItem.test.tsx @@ -72,11 +72,9 @@ describe('', () => { expect(onClick.callCount).to.equal(1); }); - it('perf: does not rerender menu items unnecessarily', async function test(t = {}) { + it('perf: does not rerender menu items unnecessarily', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const renderItem1Spy = spy(); diff --git a/packages/react/src/menu/positioner/MenuPositioner.test.tsx b/packages/react/src/menu/positioner/MenuPositioner.test.tsx index 934fb73d2f..347f4d6296 100644 --- a/packages/react/src/menu/positioner/MenuPositioner.test.tsx +++ b/packages/react/src/menu/positioner/MenuPositioner.test.tsx @@ -46,11 +46,9 @@ describe('', () => { })); describe('prop: anchor', () => { - it('should be placed near the specified element when a ref is passed', async function test(t = {}) { + it('should be placed near the specified element when a ref is passed', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function TestComponent() { @@ -91,11 +89,11 @@ describe('', () => { ); }); - it('should be placed near the specified element when an element is passed', async function test(t = {}) { + it('should be placed near the specified element when an element is passed', async ({ + skip, + }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function TestComponent() { @@ -139,11 +137,11 @@ describe('', () => { ); }); - it('should be placed near the specified element when a function returning an element is passed', async function test(t = {}) { + it('should be placed near the specified element when a function returning an element is passed', async ({ + skip, + }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function TestComponent() { @@ -189,11 +187,9 @@ describe('', () => { ); }); - it('should be placed at the specified position', async function test(t = {}) { + it('should be placed at the specified position', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const boundingRect = { diff --git a/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.test.tsx b/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.test.tsx index 672ccc7715..5d1180a9cb 100644 --- a/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.test.tsx +++ b/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.test.tsx @@ -24,11 +24,9 @@ describe('', () => { }, })); - it('should remove the indicator when there is no exit animation defined', async function test(t = {}) { + it('should remove the indicator when there is no exit animation defined', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function Test() { @@ -69,11 +67,9 @@ describe('', () => { }); }); - it('should remove the indicator when the animation finishes', async function test(t = {}) { + it('should remove the indicator when the animation finishes', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; diff --git a/packages/react/src/menu/radio-item/MenuRadioItem.test.tsx b/packages/react/src/menu/radio-item/MenuRadioItem.test.tsx index 012555604d..856f269540 100644 --- a/packages/react/src/menu/radio-item/MenuRadioItem.test.tsx +++ b/packages/react/src/menu/radio-item/MenuRadioItem.test.tsx @@ -61,11 +61,9 @@ describe('', () => { refInstanceof: window.HTMLDivElement, })); - it('perf: does not rerender menu items unnecessarily', async function test(t = {}) { + it('perf: does not rerender menu items unnecessarily', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const renderItem1Spy = spy(); diff --git a/packages/react/src/menu/root/MenuRoot.test.tsx b/packages/react/src/menu/root/MenuRoot.test.tsx index f13f33540f..bdbe604e92 100644 --- a/packages/react/src/menu/root/MenuRoot.test.tsx +++ b/packages/react/src/menu/root/MenuRoot.test.tsx @@ -138,13 +138,11 @@ describe('', () => { }); describe('text navigation', () => { - it('changes the highlighted item', async function test(t = {}) { + it('changes the highlighted item', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { // useMenuPopup Text navigation match menu items using HTMLElement.innerText // innerText is not supported by JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByText, getAllByRole } = await render( @@ -183,12 +181,10 @@ describe('', () => { expect(getByText('Cd')).to.have.attribute('tabindex', '0'); }); - it('changes the highlighted item using text navigation on label prop', async function test(t = {}) { + it('changes the highlighted item using text navigation on label prop', async ({ skip }) => { if (!/jsdom/.test(window.navigator.userAgent)) { // This test is very flaky in real browsers - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByRole, getAllByRole } = await render( @@ -238,13 +234,11 @@ describe('', () => { }); }); - it('skips the non-stringifiable items', async function test(t = {}) { + it('skips the non-stringifiable items', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { // useMenuPopup Text navigation match menu items using HTMLElement.innerText // innerText is not supported by JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByText, getAllByRole } = await render( @@ -284,13 +278,11 @@ describe('', () => { expect(getByText('Bc')).to.have.attribute('tabindex', '0'); }); - it('navigate to options with diacritic characters', async function test(t = {}) { + it('navigate to options with diacritic characters', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { // useMenuPopup Text navigation match menu items using HTMLElement.innerText // innerText is not supported by JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByText, getAllByRole } = await render( @@ -325,13 +317,11 @@ describe('', () => { expect(getByText('Bą')).to.have.attribute('tabindex', '0'); }); - it('navigate to next options beginning with diacritic characters', async function test(t = {}) { + it('navigate to next options beginning with diacritic characters', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { // useMenuPopup Text navigation match menu items using HTMLElement.innerText // innerText is not supported by JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByText, getAllByRole } = await render( @@ -360,13 +350,13 @@ describe('', () => { expect(getByText('ąa')).to.have.attribute('tabindex', '0'); }); - it('does not trigger the onClick event when Space is pressed during text navigation', async function test(t = {}) { + it('does not trigger the onClick event when Space is pressed during text navigation', async ({ + skip, + }) => { if (/jsdom/.test(window.navigator.userAgent)) { // useMenuPopup Text navigation match menu items using HTMLElement.innerText // innerText is not supported by JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const handleClick = spy(); @@ -558,12 +548,10 @@ describe('', () => { expect(button).toHaveFocus(); }); - it('focuses the trigger after the menu is closed but not unmounted', async function test(t = {}) { + it('focuses the trigger after the menu is closed but not unmounted', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { // TODO: this stopped working in vitest JSDOM mode - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByRole } = await render( @@ -694,11 +682,9 @@ describe('', () => { }); describe('controlled mode', () => { - it('should remove the popup when and there is no exit animation defined', async function test(t = {}) { + it('should remove the popup when and there is no exit animation defined', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function Test() { @@ -726,11 +712,9 @@ describe('', () => { }); }); - it('should remove the popup when the animation finishes', async function test(t = {}) { + it('should remove the popup when the animation finishes', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; diff --git a/packages/react/src/number-field/root/NumberFieldRoot.test.tsx b/packages/react/src/number-field/root/NumberFieldRoot.test.tsx index 031a97df44..ae76e35727 100644 --- a/packages/react/src/number-field/root/NumberFieldRoot.test.tsx +++ b/packages/react/src/number-field/root/NumberFieldRoot.test.tsx @@ -441,12 +441,10 @@ describe('', () => { }); describe('form handling', () => { - it('should include the input value in the form submission', async function test(t = {}) { + it('should include the input value in the form submission', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { // FormData is not available in JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } let stringifiedFormData = ''; diff --git a/packages/react/src/number-field/utils/parse.test.ts b/packages/react/src/number-field/utils/parse.test.ts index 546c3cff4f..f1da7134cc 100644 --- a/packages/react/src/number-field/utils/parse.test.ts +++ b/packages/react/src/number-field/utils/parse.test.ts @@ -23,11 +23,9 @@ describe('NumberField parse', () => { expect(parseNumber('12%')).to.equal(0.12); }); - it('parses a number with Arabic numerals', function test(t = {}) { + it('parses a number with Arabic numerals', ({ skip }) => { // Skip in browser as it doesn't support Arabic numerals. - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); expect(parseNumber('١٬٢٣٤٫٥٦')).to.equal(1234.56); }); diff --git a/packages/react/src/popover/root/PopoverRoot.test.tsx b/packages/react/src/popover/root/PopoverRoot.test.tsx index dba1471bd3..a6da68536c 100644 --- a/packages/react/src/popover/root/PopoverRoot.test.tsx +++ b/packages/react/src/popover/root/PopoverRoot.test.tsx @@ -175,11 +175,9 @@ describe('', () => { expect(handleChange.firstCall.args[0]).to.equal(false); }); - it('should remove the popup when there is no exit animation defined', async function test(t = {}) { + it('should remove the popup when there is no exit animation defined', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function Test() { @@ -208,11 +206,9 @@ describe('', () => { }); }); - it('should remove the popup when the animation finishes', async function test(t = {}) { + it('should remove the popup when the animation finishes', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; diff --git a/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx b/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx index f90c216bb4..35123f2d4a 100644 --- a/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx +++ b/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx @@ -152,11 +152,9 @@ describe('', () => { expect(screen.queryByText('Content')).to.equal(null); }); - it('should remove the popup when there is no exit animation defined', async function test(t = {}) { + it('should remove the popup when there is no exit animation defined', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function Test() { @@ -184,11 +182,9 @@ describe('', () => { }); }); - it('should remove the popup when the animation finishes', async function test(t = {}) { + it('should remove the popup when the animation finishes', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } let animationFinished = false; diff --git a/packages/react/src/radio-group/RadioGroup.test.tsx b/packages/react/src/radio-group/RadioGroup.test.tsx index 44815c6a9e..c53123d20a 100644 --- a/packages/react/src/radio-group/RadioGroup.test.tsx +++ b/packages/react/src/radio-group/RadioGroup.test.tsx @@ -159,12 +159,10 @@ describe('', () => { expect(group.nextElementSibling).to.have.attribute('name', 'radio-group'); }); - it('should include the radio value in the form submission', async function test(t = {}) { + it('should include the radio value in the form submission', async ({ skip }) => { if (isJSDOM) { // FormData is not available in JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } let stringifiedFormData = ''; diff --git a/packages/react/src/radio/indicator/RadioIndicator.test.tsx b/packages/react/src/radio/indicator/RadioIndicator.test.tsx index 138be27885..aa434f47ba 100644 --- a/packages/react/src/radio/indicator/RadioIndicator.test.tsx +++ b/packages/react/src/radio/indicator/RadioIndicator.test.tsx @@ -19,11 +19,9 @@ describe('', () => { }, })); - it('should remove the indicator when there is no exit animation defined', async function test(t = {}) { + it('should remove the indicator when there is no exit animation defined', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function Test() { @@ -60,11 +58,9 @@ describe('', () => { }); }); - it('should remove the indicator when the animation finishes', async function test(t = {}) { + it('should remove the indicator when the animation finishes', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; diff --git a/packages/react/src/select/item/SelectItem.test.tsx b/packages/react/src/select/item/SelectItem.test.tsx index b14ac7c073..fb1bb479b1 100644 --- a/packages/react/src/select/item/SelectItem.test.tsx +++ b/packages/react/src/select/item/SelectItem.test.tsx @@ -80,11 +80,9 @@ describe('', () => { }); }); - it('should select item when Enter key is pressed', async function test(t = {}) { + it('should select item when Enter key is pressed', async ({ skip }) => { if (!isJSDOM) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { user } = await render( @@ -179,11 +177,9 @@ describe('', () => { }); describe('style hooks', () => { - it('should apply data-highlighted attribute when item is highlighted', async function test(t = {}) { + it('should apply data-highlighted attribute when item is highlighted', async ({ skip }) => { if (!isJSDOM) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { user } = await render( diff --git a/packages/react/src/select/root/SelectRoot.test.tsx b/packages/react/src/select/root/SelectRoot.test.tsx index 8110d4b23b..a3d8409112 100644 --- a/packages/react/src/select/root/SelectRoot.test.tsx +++ b/packages/react/src/select/root/SelectRoot.test.tsx @@ -195,11 +195,11 @@ describe('', () => { expect(screen.queryByRole('listbox')).not.to.equal(null); }); - it('when `false`, should remove the popup when there is no exit animation defined', async function test(t = {}) { + it('when `false`, should remove the popup when there is no exit animation defined', async ({ + skip, + }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } function Test() { @@ -227,11 +227,9 @@ describe('', () => { }); }); - it('when `false`, should remove the popup when the animation finishes', async function test(t = {}) { + it('when `false`, should remove the popup when the animation finishes', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; diff --git a/packages/react/src/slider/root/SliderRoot.test.tsx b/packages/react/src/slider/root/SliderRoot.test.tsx index 400faedbd0..60c9f954fb 100644 --- a/packages/react/src/slider/root/SliderRoot.test.tsx +++ b/packages/react/src/slider/root/SliderRoot.test.tsx @@ -65,8 +65,7 @@ function TestRangeSlider(props: SliderRoot.Props) { } describeSkipIf(typeof Touch === 'undefined')('', () => { - // eslint-disable-next-line mocha/no-top-level-hooks - before(function beforeHook() { + beforeAll(function beforeHook() { // PointerEvent not fully implemented in jsdom, causing // fireEvent.pointer* to ignore options // https://github.com/jsdom/jsdom/issues/2527 @@ -327,12 +326,10 @@ describeSkipIf(typeof Touch === 'undefined')('', () => { }); }); - it('should not respond to drag events after becoming disabled', async function test(t = {}) { + it('should not respond to drag events after becoming disabled', async ({ skip }) => { // TODO: Don't skip once a fix for https://github.com/jsdom/jsdom/issues/3029 is released. if (isJSDOM) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByRole, setProps, getByTestId } = await render( @@ -366,12 +363,10 @@ describeSkipIf(typeof Touch === 'undefined')('', () => { expect(thumb).to.have.attribute('aria-valuenow', '21'); }); - it('should not respond to drag events if disabled', async function test(t = {}) { + it('should not respond to drag events if disabled', async ({ skip }) => { // TODO: Don't skip once a fix for https://github.com/jsdom/jsdom/issues/3029 is released. if (isJSDOM) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getByRole, getByTestId } = await render( @@ -423,11 +418,9 @@ describeSkipIf(typeof Touch === 'undefined')('', () => { expect(sliderOutput).to.have.attribute('data-orientation', 'horizontal'); }); - it('does not set the orientation via appearance for WebKit browsers', async function test(t = {}) { + it('does not set the orientation via appearance for WebKit browsers', async ({ skip }) => { if (isJSDOM || !/WebKit/.test(window.navigator.userAgent)) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } await render(); @@ -1114,12 +1107,12 @@ describeSkipIf(typeof Touch === 'undefined')('', () => { describe('form submission', () => { // doesn't work with two `` elements with the same name attribute - it('includes the slider value in formData when the `name` attribute is provided', async function test(t = {}) { + it('includes the slider value in formData when the `name` attribute is provided', async ({ + skip, + }) => { if (isJSDOM) { // FormData is not available in JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const handleSubmit = (event: React.FormEvent) => { diff --git a/packages/react/src/switch/root/SwitchRoot.test.tsx b/packages/react/src/switch/root/SwitchRoot.test.tsx index c134a90d57..ca5ca89abb 100644 --- a/packages/react/src/switch/root/SwitchRoot.test.tsx +++ b/packages/react/src/switch/root/SwitchRoot.test.tsx @@ -207,12 +207,10 @@ describe('', () => { expect(switchElement).to.have.attribute('aria-checked', 'true'); }); - it('should include the switch value in the form submission', async function test(t = {}) { + it('should include the switch value in the form submission', async ({ skip }) => { if (/jsdom/.test(window.navigator.userAgent)) { // FormData is not available in JSDOM - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } let stringifiedFormData = ''; diff --git a/packages/react/src/tabs/root/TabsRoot.test.tsx b/packages/react/src/tabs/root/TabsRoot.test.tsx index a62a40534f..619384abc3 100644 --- a/packages/react/src/tabs/root/TabsRoot.test.tsx +++ b/packages/react/src/tabs/root/TabsRoot.test.tsx @@ -14,7 +14,7 @@ const isJSDOM = /jsdom/.test(window.navigator.userAgent); describe('', () => { const { render } = createRenderer(); - before(function beforeHook() { + beforeEach(function beforeHook({ skip }) { const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // The test fails on Safari with just: @@ -22,9 +22,7 @@ describe('', () => { // container.scrollLeft = 200; // expect(container.scrollLeft).to.equal(200); 💥 if (isSafari) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } }); diff --git a/packages/react/src/toggle-group/ToggleGroup.test.tsx b/packages/react/src/toggle-group/ToggleGroup.test.tsx index d60e4a9e4f..45d216e606 100644 --- a/packages/react/src/toggle-group/ToggleGroup.test.tsx +++ b/packages/react/src/toggle-group/ToggleGroup.test.tsx @@ -27,11 +27,9 @@ describe('', () => { }); describe('uncontrolled', () => { - it('pressed state', async function test(t = {}) { + it('pressed state', async ({ skip }) => { if (isJSDOM) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const { getAllByRole, user } = await render( @@ -342,11 +340,9 @@ describe('', () => { }); ['Enter', 'Space'].forEach((key) => { - it(`fires when when the ${key} is pressed`, async function test(t = {}) { + it(`fires when when the ${key} is pressed`, async ({ skip }) => { if (isJSDOM) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } const onValueChange = spy(); diff --git a/packages/react/src/tooltip/root/TooltipRoot.test.tsx b/packages/react/src/tooltip/root/TooltipRoot.test.tsx index 70c8c637ab..99427b7e49 100644 --- a/packages/react/src/tooltip/root/TooltipRoot.test.tsx +++ b/packages/react/src/tooltip/root/TooltipRoot.test.tsx @@ -66,11 +66,9 @@ describe('', () => { expect(screen.queryByText('Content')).to.equal(null); }); - it('should open when the trigger is focused', async function test(t = {}) { + it('should open when the trigger is focused', async ({ skip }) => { if (isJSDOM) { - // @ts-expect-error to support mocha and vitest - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - this?.skip?.() || t?.skip(); + skip(); } await render( diff --git a/packages/react/src/utils/useId.test.tsx b/packages/react/src/utils/useId.test.tsx index 67c1e4e355..960f1cc0cd 100644 --- a/packages/react/src/utils/useId.test.tsx +++ b/packages/react/src/utils/useId.test.tsx @@ -86,9 +86,9 @@ describe('useId', () => { ); }); - it('provides an ID on server in React 18', function test() { + it('provides an ID on server in React 18', ({ skip }) => { if (React.useId === undefined) { - this.skip(); + skip(); } function TestComponent() { const id = useId(); diff --git a/packages/react/test/describeConformance.tsx b/packages/react/test/describeConformance.tsx index b301fcc8c4..2cc5b51095 100644 --- a/packages/react/test/describeConformance.tsx +++ b/packages/react/test/describeConformance.tsx @@ -49,7 +49,7 @@ function describeConformanceFn( only.indexOf(testKey) !== -1 && skip.indexOf(testKey as keyof typeof fullSuite) === -1, ) as (keyof typeof fullSuite)[]; - after(runAfterHook); + afterAll(runAfterHook); filteredTests.forEach((testKey) => { const test = fullSuite[testKey]; diff --git a/packages/react/tsconfig.test.json b/packages/react/tsconfig.test.json index 24a8a173f1..a154255042 100644 --- a/packages/react/tsconfig.test.json +++ b/packages/react/tsconfig.test.json @@ -8,8 +8,9 @@ "module": "esnext", "moduleResolution": "bundler", "rootDir": ".", - "outDir": "build-tests" + "outDir": "build-tests", + "types": ["vitest/globals", "@types/chai", "@types/chai-dom"] }, - "include": ["src/**/*.spec.ts*", "src/**/*.test.ts*", "test"], + "include": ["src/**/*.spec.ts*", "src/**/*.test.ts*", "src/index.test.js", "test"], "references": [{ "path": "./tsconfig.build.json" }] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c954b231e7..62b55512a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -83,9 +83,6 @@ importers: '@types/lodash': specifier: ^4.17.13 version: 4.17.13 - '@types/mocha': - specifier: ^10.0.10 - version: 10.0.10 '@types/node': specifier: ^18.19.69 version: 18.19.69 @@ -197,9 +194,6 @@ importers: eslint-plugin-material-ui: specifier: workspace:^ version: link:packages/eslint-plugin-material-ui - eslint-plugin-mocha: - specifier: ^10.5.0 - version: 10.5.0(eslint@8.57.1) eslint-plugin-react: specifier: ^7.37.3 version: 7.37.3(eslint@8.57.1) @@ -224,30 +218,6 @@ importers: jsonc-parser: specifier: ^3.3.1 version: 3.3.1 - karma: - specifier: ^6.4.4 - version: 6.4.4 - karma-browserstack-launcher: - specifier: ~1.6.0 - version: 1.6.0(karma@6.4.4) - karma-chrome-launcher: - specifier: ^3.2.0 - version: 3.2.0 - karma-coverage-istanbul-reporter: - specifier: ^3.0.3 - version: 3.0.3 - karma-firefox-launcher: - specifier: ^2.1.3 - version: 2.1.3 - karma-mocha: - specifier: ^2.0.1 - version: 2.0.1 - karma-sourcemap-loader: - specifier: ^0.4.0 - version: 0.4.0 - karma-webpack: - specifier: ^5.0.1 - version: 5.0.1(webpack@5.97.1) lerna: specifier: ^8.1.9 version: 8.1.9(babel-plugin-macros@3.1.0)(encoding@0.1.13) @@ -257,9 +227,6 @@ importers: markdownlint-cli2: specifier: ^0.17.1 version: 0.17.1 - mocha: - specifier: ^10.8.2 - version: 10.8.2 nx: specifier: ^18.3.5 version: 18.3.5 @@ -3125,9 +3092,6 @@ packages: resolution: {integrity: sha512-d4SdG+6UmGdzWw38a4sN3lF/nTEzsDxhzU13wm10ejOpPehtmRoqBKnPztQUfFiWbNvSb4czkWYJD4kt+5+Fuw==} engines: {node: '>= 18', npm: '>= 8.6.0'} - '@socket.io/component-emitter@3.1.1': - resolution: {integrity: sha512-dzJtaDAAoXx4GCOJpbB2eG/Qj8VDpdwkLsWGzGm+0L7E8/434RyMbAHmk9ubXWVAb9nXmc44jUf8GKqVDiKezg==} - '@stefanprobst/rehype-extract-toc@2.2.1': resolution: {integrity: sha512-SfDrnqz7WVp/xYxPqAxD4lR/CJZcsFcy1T0JNAZfK4grdHJAbHplhF5yZgAOnba5+7ovbpRwfHMffTFlrcvwFQ==} engines: {node: '>=14.17'} @@ -3275,15 +3239,9 @@ packages: '@types/chai@4.3.20': resolution: {integrity: sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==} - '@types/cookie@0.4.1': - resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} - '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/cors@2.8.17': - resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} - '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -3344,9 +3302,6 @@ packages: '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/mocha@10.0.10': - resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} - '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} @@ -3711,10 +3666,6 @@ packages: add-stream@1.0.0: resolution: {integrity: sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==} - agent-base@4.3.0: - resolution: {integrity: sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==} - engines: {node: '>= 4.0.0'} - agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -3993,10 +3944,6 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - base64id@2.0.0: - resolution: {integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==} - engines: {node: ^4.5.0 || >= 5.9} - before-after-hook@2.2.3: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} @@ -4017,10 +3964,6 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - body-parser@1.20.3: - resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - body-parser@2.0.2: resolution: {integrity: sha512-SNMk0OONlQ01uk8EPeiBvTW7W4ovpL5b1O3t1sjpPgfxOQ6BqQJ6XjxinDPR79Z6HdcD5zBBwr5ssiTlgdNztQ==} engines: {node: '>=18'} @@ -4047,12 +3990,6 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - browserstack-local@1.5.5: - resolution: {integrity: sha512-jKne7yosrMcptj3hqxp36TP9k0ZW2sCqhyurX24rUL4G3eT7OLgv+CSQN8iq5dtkv5IK+g+v8fWvsiC/S9KxMg==} - - browserstack@1.5.3: - resolution: {integrity: sha512-AO+mECXsW4QcqC9bxwM29O7qWa7bJT94uBFzeb5brylIQwawuEziwq20dPYbins95GlWzOawgyDNdjYAo32EKg==} - buffer-equal-constant-time@1.0.1: resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} @@ -4415,10 +4352,6 @@ packages: confusing-browser-globals@1.0.11: resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - connect@3.7.0: - resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} - engines: {node: '>= 0.10.0'} - console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} @@ -4479,10 +4412,6 @@ packages: resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} engines: {node: '>=6.6.0'} - cookie@0.4.2: - resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} - engines: {node: '>= 0.6'} - cookie@0.7.1: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} @@ -4503,10 +4432,6 @@ packages: core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - cors@2.8.5: - resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} - engines: {node: '>= 0.10'} - cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} engines: {node: '>=10'} @@ -4561,9 +4486,6 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - custom-event@1.0.1: - resolution: {integrity: sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==} - damerau-levenshtein@1.0.8: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} @@ -4596,10 +4518,6 @@ packages: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} - date-format@4.0.14: - resolution: {integrity: sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==} - engines: {node: '>=4.0'} - dateformat@3.0.3: resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} @@ -4743,9 +4661,6 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - di@0.0.1: - resolution: {integrity: sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==} - diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4776,9 +4691,6 @@ packages: dom-accessibility-api@0.7.0: resolution: {integrity: sha512-LjjdFmd9AITAet3Hy6Y6rwB7Sq1+x5NiwbOpnkLHC1bCXJqJKiV9DyppSSWobuSKvjKXt9G2u3hW402MPt6m+g==} - dom-serialize@2.2.1: - resolution: {integrity: sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==} - dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -4844,14 +4756,6 @@ packages: end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - engine.io-parser@5.2.2: - resolution: {integrity: sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==} - engines: {node: '>=10.0.0'} - - engine.io@6.5.4: - resolution: {integrity: sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg==} - engines: {node: '>=10.2.0'} - enhanced-resolve@5.17.1: resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} @@ -4860,9 +4764,6 @@ packages: resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} engines: {node: '>=8.6'} - ent@2.2.0: - resolution: {integrity: sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==} - entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -4926,12 +4827,6 @@ packages: es6-error@4.1.1: resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} - es6-promise@4.2.8: - resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} - - es6-promisify@5.0.0: - resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} - esast-util-from-estree@2.0.0: resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==} @@ -5066,12 +4961,6 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 - eslint-plugin-mocha@10.5.0: - resolution: {integrity: sha512-F2ALmQVPT1GoP27O1JTZGrV9Pqg8k79OeIuvw63UxMtQKREZtmkK1NFgkZQ2TW7L2JSSFKHFPTtHu5z8R9QNRw==} - engines: {node: '>=14.0.0'} - peerDependencies: - eslint: '>=7.0.0' - eslint-plugin-react-hooks@4.6.2: resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==} engines: {node: '>=10'} @@ -5106,16 +4995,6 @@ packages: resolution: {integrity: sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint-utils@3.0.0: - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - - eslint-visitor-keys@2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5207,9 +5086,6 @@ packages: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} - event-stream@3.3.4: - resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==} - eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -5329,10 +5205,6 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - finalhandler@1.1.2: - resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} - engines: {node: '>= 0.8'} - finalhandler@2.0.0: resolution: {integrity: sha512-MX6Zo2adDViYh+GcxxB1dpO43eypOGUOL12rLCOTMQv/DfIbpSJUy4oQIIZhVZkH9e+bZWKMon0XHFEju16tkQ==} engines: {node: '>= 0.8'} @@ -5451,9 +5323,6 @@ packages: resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} engines: {node: '>= 0.8'} - from@0.1.7: - resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} - fromentries@1.3.2: resolution: {integrity: sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==} @@ -5468,10 +5337,6 @@ packages: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} engines: {node: '>=14.14'} - fs-extra@8.1.0: - resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} - engines: {node: '>=6 <7 || >=8'} - fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} @@ -5854,14 +5719,6 @@ packages: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} - http-proxy@1.18.1: - resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} - engines: {node: '>=8.0.0'} - - https-proxy-agent@2.2.4: - resolution: {integrity: sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==} - engines: {node: '>= 4.5.0'} - https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -6158,9 +6015,6 @@ packages: resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} - is-running@2.1.0: - resolution: {integrity: sha512-mjJd3PujZMl7j+D395WTIO5tU5RIDBfVSRtRR4VOJou3H66E38UjbjvDGh3slJzPuolsb+yQFqwHNNdyp5jg3w==} - is-set@2.0.3: resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} engines: {node: '>= 0.4'} @@ -6248,10 +6102,6 @@ packages: isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - isbinaryfile@4.0.10: - resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} - engines: {node: '>= 8.0.0'} - isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -6263,10 +6113,6 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} - istanbul-lib-coverage@2.0.5: - resolution: {integrity: sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==} - engines: {node: '>=6'} - istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} @@ -6295,10 +6141,6 @@ packages: resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} engines: {node: '>=10'} - istanbul-lib-source-maps@3.0.6: - resolution: {integrity: sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==} - engines: {node: '>=6'} - istanbul-lib-source-maps@4.0.1: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} @@ -6425,9 +6267,6 @@ packages: jsonc-parser@3.3.1: resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} - jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -6468,37 +6307,6 @@ packages: jws@4.0.0: resolution: {integrity: sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==} - karma-browserstack-launcher@1.6.0: - resolution: {integrity: sha512-Y/UWPdHZkHIVH2To4GWHCTzmrsB6H7PBWy6pw+TWz5sr4HW2mcE+Uj6qWgoVNxvQU1Pfn5LQQzI6EQ65p8QbiQ==} - peerDependencies: - karma: '>=0.9' - - karma-chrome-launcher@3.2.0: - resolution: {integrity: sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==} - - karma-coverage-istanbul-reporter@3.0.3: - resolution: {integrity: sha512-wE4VFhG/QZv2Y4CdAYWDbMmcAHeS926ZIji4z+FkB2aF/EposRb6DP6G5ncT/wXhqUfAb/d7kZrNKPonbvsATw==} - - karma-firefox-launcher@2.1.3: - resolution: {integrity: sha512-LMM2bseebLbYjODBOVt7TCPP9OI2vZIXCavIXhkO9m+10Uj5l7u/SKoeRmYx8FYHTVGZSpk6peX+3BMHC1WwNw==} - - karma-mocha@2.0.1: - resolution: {integrity: sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==} - - karma-sourcemap-loader@0.4.0: - resolution: {integrity: sha512-xCRL3/pmhAYF3I6qOrcn0uhbQevitc2DERMPH82FMnG+4WReoGcGFZb1pURf2a5apyrOHRdvD+O6K7NljqKHyA==} - - karma-webpack@5.0.1: - resolution: {integrity: sha512-oo38O+P3W2mSPCSUrQdySSPv1LvPpXP+f+bBimNomS5sW+1V4SuhCuW8TfJzV+rDv921w2fDSDw0xJbPe6U+kQ==} - engines: {node: '>= 18'} - peerDependencies: - webpack: ^5.0.0 - - karma@6.4.4: - resolution: {integrity: sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==} - engines: {node: '>= 10'} - hasBin: true - katex@0.16.19: resolution: {integrity: sha512-3IA6DYVhxhBabjSLTNO9S4+OliA3Qvb8pBQXMfC4WxXJgLwZgnfDl0BmB4z6nBMdznBsZ+CGM8DrGZ5hcguDZg==} hasBin: true @@ -6719,10 +6527,6 @@ packages: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} engines: {node: '>=10'} - log4js@6.9.1: - resolution: {integrity: sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==} - engines: {node: '>=8.0'} - longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} @@ -6784,9 +6588,6 @@ packages: resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} engines: {node: '>=8'} - map-stream@0.1.0: - resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} - markdown-extensions@2.0.0: resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} engines: {node: '>=16'} @@ -7068,11 +6869,6 @@ packages: resolution: {integrity: sha512-XqoSHeCGjVClAmoGFG3lVFqQFRIrTVw2OH3axRqAcfaw+gHWIfnASS92AV+Rl/mk0MupgZTRHQOjxY6YVnzK5w==} engines: {node: '>= 0.6'} - mime@2.6.0: - resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} - engines: {node: '>=4.0.0'} - hasBin: true - mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -7158,20 +6954,11 @@ packages: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} - mkdirp@0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true - mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} hasBin: true - mocha@10.8.2: - resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} - engines: {node: '>= 14.0.0'} - hasBin: true - mocha@11.0.1: resolution: {integrity: sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7468,10 +7255,6 @@ packages: resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==} engines: {node: '>= 0.4'} - on-finished@2.3.0: - resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} - engines: {node: '>= 0.8'} - on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} @@ -7767,9 +7550,6 @@ packages: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} - pause-stream@0.0.11: - resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} - picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -8080,11 +7860,6 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - ps-tree@1.2.0: - resolution: {integrity: sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==} - engines: {node: '>= 0.10'} - hasBin: true - psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} @@ -8101,18 +7876,6 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - q@1.5.1: - resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} - engines: {node: '>=0.6.0', teleport: '>=0.2.0'} - deprecated: |- - You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. - - (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) - - qjobs@1.2.0: - resolution: {integrity: sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==} - engines: {node: '>=0.9'} - qs@6.13.0: resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} @@ -8131,9 +7894,6 @@ packages: resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} engines: {node: '>=8'} - rambda@7.5.0: - resolution: {integrity: sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==} - randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} @@ -8145,10 +7905,6 @@ packages: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} - raw-body@2.5.2: - resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} - engines: {node: '>= 0.8'} - raw-body@3.0.0: resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==} engines: {node: '>= 0.8'} @@ -8435,19 +8191,6 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rfdc@1.3.1: - resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} - - rimraf@2.5.4: - resolution: {integrity: sha512-Lw7SHMjssciQb/rRz7JyPIy9+bbUshEucPoLRvWqy09vC5zQixl8Uet+Zl+SROBB/JMWHJRdCk1qdxNWHNMvlQ==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - - rimraf@2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} deprecated: Rimraf versions prior to v4 are no longer supported @@ -8671,17 +8414,6 @@ packages: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} - socket.io-adapter@2.5.4: - resolution: {integrity: sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg==} - - socket.io-parser@4.2.4: - resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} - engines: {node: '>=10.0.0'} - - socket.io@4.7.5: - resolution: {integrity: sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==} - engines: {node: '>=10.2.0'} - socks-proxy-agent@8.0.3: resolution: {integrity: sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==} engines: {node: '>= 14'} @@ -8738,9 +8470,6 @@ packages: split2@3.2.2: resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} - split@0.3.3: - resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==} - split@1.0.1: resolution: {integrity: sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==} @@ -8760,10 +8489,6 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - statuses@1.5.0: - resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} - engines: {node: '>= 0.6'} - statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} @@ -8771,13 +8496,6 @@ packages: std-env@3.8.0: resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} - stream-combiner@0.0.4: - resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==} - - streamroller@3.1.5: - resolution: {integrity: sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==} - engines: {node: '>=8.0'} - streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} @@ -8979,10 +8697,6 @@ packages: resolution: {integrity: sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ==} engines: {node: '>=4'} - temp-fs@0.9.9: - resolution: {integrity: sha512-WfecDCR1xC9b0nsrzSaxPf3ZuWeWLUWblW4vlDQAa1biQaKHiImHnJfeQocQe/hXKMcolRzgkcVX/7kK4zoWbw==} - engines: {node: '>=0.8.0'} - terser-webpack-plugin@5.3.11: resolution: {integrity: sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ==} engines: {node: '>= 10.13.0'} @@ -9255,9 +8969,6 @@ packages: engines: {node: '>=14.17'} hasBin: true - ua-parser-js@0.7.37: - resolution: {integrity: sha512-xV8kqRKM+jhMvcHWUKthV9fNebIzrNy//2O9ZwWcfiBFR5f25XVZPLlEajk/sf3Ra15V92isyQqnIEXRDaZWEA==} - uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} @@ -9345,10 +9056,6 @@ packages: universal-user-agent@7.0.2: resolution: {integrity: sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==} - universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} - universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} @@ -9552,10 +9259,6 @@ packages: jsdom: optional: true - void-elements@2.0.1: - resolution: {integrity: sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==} - engines: {node: '>=0.10.0'} - w3c-xmlserializer@5.0.0: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'} @@ -9602,9 +9305,6 @@ packages: webpack-dev-server: optional: true - webpack-merge@4.2.2: - resolution: {integrity: sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==} - webpack-merge@5.10.0: resolution: {integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==} engines: {node: '>=10.0.0'} @@ -9666,11 +9366,6 @@ packages: engines: {node: '>= 8'} hasBin: true - which@3.0.1: - resolution: {integrity: sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - hasBin: true - which@4.0.0: resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==} engines: {node: ^16.13.0 || >=18.0.0} @@ -9746,18 +9441,6 @@ packages: utf-8-validate: optional: true - ws@8.11.0: - resolution: {integrity: sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - ws@8.18.0: resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} @@ -10717,7 +10400,8 @@ snapshots: '@types/tough-cookie': 4.0.5 tough-cookie: 4.1.4 - '@colors/colors@1.5.0': {} + '@colors/colors@1.5.0': + optional: true '@csstools/cascade-layer-name-parser@2.0.4(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': dependencies: @@ -12531,8 +12215,6 @@ snapshots: transitivePeerDependencies: - debug - '@socket.io/component-emitter@3.1.1': {} - '@stefanprobst/rehype-extract-toc@2.2.1': dependencies: estree-util-is-identifier-name: 2.1.0 @@ -12676,14 +12358,8 @@ snapshots: '@types/chai@4.3.20': {} - '@types/cookie@0.4.1': {} - '@types/cookie@0.6.0': {} - '@types/cors@2.8.17': - dependencies: - '@types/node': 18.19.69 - '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.34 @@ -12747,8 +12423,6 @@ snapshots: '@types/minimist@1.2.5': {} - '@types/mocha@10.0.10': {} - '@types/ms@0.7.34': {} '@types/node@18.19.69': @@ -13230,10 +12904,6 @@ snapshots: add-stream@1.0.0: {} - agent-base@4.3.0: - dependencies: - es6-promisify: 5.0.0 - agent-base@6.0.2: dependencies: debug: 4.3.7(supports-color@8.1.1) @@ -13544,8 +13214,6 @@ snapshots: base64-js@1.5.1: {} - base64id@2.0.0: {} - before-after-hook@2.2.3: {} before-after-hook@3.0.2: {} @@ -13567,23 +13235,6 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - body-parser@1.20.3: - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.13.0 - raw-body: 2.5.2 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - body-parser@2.0.2: dependencies: bytes: 3.1.2 @@ -13632,22 +13283,6 @@ snapshots: node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) - browserstack-local@1.5.5: - dependencies: - agent-base: 6.0.2 - https-proxy-agent: 5.0.1 - is-running: 2.1.0 - ps-tree: 1.2.0 - temp-fs: 0.9.9 - transitivePeerDependencies: - - supports-color - - browserstack@1.5.3: - dependencies: - https-proxy-agent: 2.2.4 - transitivePeerDependencies: - - supports-color - buffer-equal-constant-time@1.0.1: {} buffer-from@0.1.2: {} @@ -14019,15 +13654,6 @@ snapshots: confusing-browser-globals@1.0.11: {} - connect@3.7.0: - dependencies: - debug: 2.6.9 - finalhandler: 1.1.2 - parseurl: 1.3.3 - utils-merge: 1.0.1 - transitivePeerDependencies: - - supports-color - console-control-strings@1.1.0: {} content-disposition@0.5.2: {} @@ -14101,8 +13727,6 @@ snapshots: cookie-signature@1.2.2: {} - cookie@0.4.2: {} - cookie@0.7.1: {} cookie@0.7.2: {} @@ -14117,11 +13741,6 @@ snapshots: core-util-is@1.0.3: {} - cors@2.8.5: - dependencies: - object-assign: 4.1.1 - vary: 1.1.2 - cosmiconfig@7.1.0: dependencies: '@types/parse-json': 4.0.2 @@ -14177,8 +13796,6 @@ snapshots: csstype@3.1.3: {} - custom-event@1.0.1: {} - damerau-levenshtein@1.0.8: {} danger@12.3.3(encoding@0.1.13): @@ -14253,8 +13870,6 @@ snapshots: dependencies: '@babel/runtime': 7.26.0 - date-format@4.0.14: {} - dateformat@3.0.3: {} debounce@1.2.1: {} @@ -14352,8 +13967,6 @@ snapshots: dependencies: dequal: 2.0.3 - di@0.0.1: {} - diff-sequences@29.6.3: {} diff@5.2.0: {} @@ -14376,13 +13989,6 @@ snapshots: dom-accessibility-api@0.7.0: {} - dom-serialize@2.2.1: - dependencies: - custom-event: 1.0.1 - ent: 2.2.0 - extend: 3.0.2 - void-elements: 2.0.1 - dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -14438,25 +14044,6 @@ snapshots: dependencies: once: 1.4.0 - engine.io-parser@5.2.2: {} - - engine.io@6.5.4: - dependencies: - '@types/cookie': 0.4.1 - '@types/cors': 2.8.17 - '@types/node': 18.19.69 - accepts: 1.3.8 - base64id: 2.0.0 - cookie: 0.4.2 - cors: 2.8.5 - debug: 4.3.7(supports-color@8.1.1) - engine.io-parser: 5.2.2 - ws: 8.11.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.11 @@ -14466,8 +14053,6 @@ snapshots: dependencies: ansi-colors: 4.1.3 - ent@2.2.0: {} - entities@4.5.0: {} env-paths@2.2.1: {} @@ -14583,12 +14168,6 @@ snapshots: es6-error@4.1.1: {} - es6-promise@4.2.8: {} - - es6-promisify@5.0.0: - dependencies: - es6-promise: 4.2.8 - esast-util-from-estree@2.0.0: dependencies: '@types/estree-jsx': 1.0.5 @@ -14822,13 +14401,6 @@ snapshots: safe-regex-test: 1.1.0 string.prototype.includes: 2.0.1 - eslint-plugin-mocha@10.5.0(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-utils: 3.0.0(eslint@8.57.1) - globals: 13.24.0 - rambda: 7.5.0 - eslint-plugin-react-hooks@4.6.2(eslint@8.57.1): dependencies: eslint: 8.57.1 @@ -14880,13 +14452,6 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-utils@3.0.0(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-visitor-keys: 2.1.0 - - eslint-visitor-keys@2.1.0: {} - eslint-visitor-keys@3.4.3: {} eslint-visitor-keys@4.2.0: {} @@ -15054,16 +14619,6 @@ snapshots: etag@1.8.1: {} - event-stream@3.3.4: - dependencies: - duplexer: 0.1.2 - from: 0.1.7 - map-stream: 0.1.0 - pause-stream: 0.0.11 - split: 0.3.3 - stream-combiner: 0.0.4 - through: 2.3.8 - eventemitter3@4.0.7: {} eventemitter3@5.0.1: {} @@ -15240,18 +14795,6 @@ snapshots: dependencies: to-regex-range: 5.0.1 - finalhandler@1.1.2: - dependencies: - debug: 2.6.9 - encodeurl: 1.0.2 - escape-html: 1.0.3 - on-finished: 2.3.0 - parseurl: 1.3.3 - statuses: 1.5.0 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - finalhandler@2.0.0: dependencies: debug: 2.6.9 @@ -15375,8 +14918,6 @@ snapshots: fresh@2.0.0: {} - from@0.1.7: {} - fromentries@1.3.2: {} fs-constants@1.0.0: {} @@ -15389,12 +14930,6 @@ snapshots: jsonfile: 6.1.0 universalify: 2.0.1 - fs-extra@8.1.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - fs-minipass@2.1.0: dependencies: minipass: 3.3.6 @@ -15905,21 +15440,6 @@ snapshots: transitivePeerDependencies: - supports-color - http-proxy@1.18.1: - dependencies: - eventemitter3: 4.0.7 - follow-redirects: 1.15.6(debug@4.3.7) - requires-port: 1.0.0 - transitivePeerDependencies: - - debug - - https-proxy-agent@2.2.4: - dependencies: - agent-base: 4.3.0 - debug: 3.2.7 - transitivePeerDependencies: - - supports-color - https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 @@ -16193,8 +15713,6 @@ snapshots: has-tostringtag: 1.0.2 hasown: 2.0.2 - is-running@2.1.0: {} - is-set@2.0.3: {} is-shared-array-buffer@1.0.4: @@ -16265,16 +15783,12 @@ snapshots: isarray@2.0.5: {} - isbinaryfile@4.0.10: {} - isexe@2.0.0: {} isexe@3.1.1: {} isobject@3.0.1: {} - istanbul-lib-coverage@2.0.5: {} - istanbul-lib-coverage@3.2.2: {} istanbul-lib-hook@3.0.0: @@ -16325,16 +15839,6 @@ snapshots: make-dir: 4.0.0 supports-color: 7.2.0 - istanbul-lib-source-maps@3.0.6: - dependencies: - debug: 4.3.7(supports-color@8.1.1) - istanbul-lib-coverage: 2.0.5 - make-dir: 2.1.0 - rimraf: 2.7.1 - source-map: 0.6.1 - transitivePeerDependencies: - - supports-color - istanbul-lib-source-maps@4.0.1: dependencies: debug: 4.3.7(supports-color@8.1.1) @@ -16482,10 +15986,6 @@ snapshots: jsonc-parser@3.3.1: {} - jsonfile@4.0.0: - optionalDependencies: - graceful-fs: 4.2.11 - jsonfile@6.1.0: dependencies: universalify: 2.0.1 @@ -16544,81 +16044,6 @@ snapshots: jwa: 2.0.0 safe-buffer: 5.2.1 - karma-browserstack-launcher@1.6.0(karma@6.4.4): - dependencies: - browserstack: 1.5.3 - browserstack-local: 1.5.5 - karma: 6.4.4 - q: 1.5.1 - transitivePeerDependencies: - - supports-color - - karma-chrome-launcher@3.2.0: - dependencies: - which: 1.3.1 - - karma-coverage-istanbul-reporter@3.0.3: - dependencies: - istanbul-lib-coverage: 3.2.2 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 3.0.6 - istanbul-reports: 3.1.7 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - karma-firefox-launcher@2.1.3: - dependencies: - is-wsl: 2.2.0 - which: 3.0.1 - - karma-mocha@2.0.1: - dependencies: - minimist: 1.2.8 - - karma-sourcemap-loader@0.4.0: - dependencies: - graceful-fs: 4.2.11 - - karma-webpack@5.0.1(webpack@5.97.1): - dependencies: - glob: 7.2.3 - minimatch: 9.0.4 - webpack: 5.97.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.97.1)) - webpack-merge: 4.2.2 - - karma@6.4.4: - dependencies: - '@colors/colors': 1.5.0 - body-parser: 1.20.3 - braces: 3.0.3 - chokidar: 3.6.0 - connect: 3.7.0 - di: 0.0.1 - dom-serialize: 2.2.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - http-proxy: 1.18.1 - isbinaryfile: 4.0.10 - lodash: 4.17.21 - log4js: 6.9.1 - mime: 2.6.0 - minimatch: 3.1.2 - mkdirp: 0.5.6 - qjobs: 1.2.0 - range-parser: 1.2.1 - rimraf: 3.0.2 - socket.io: 4.7.5 - source-map: 0.6.1 - tmp: 0.2.3 - ua-parser-js: 0.7.37 - yargs: 16.2.0 - transitivePeerDependencies: - - bufferutil - - debug - - supports-color - - utf-8-validate - katex@0.16.19: dependencies: commander: 8.3.0 @@ -16898,16 +16323,6 @@ snapshots: chalk: 4.1.2 is-unicode-supported: 0.1.0 - log4js@6.9.1: - dependencies: - date-format: 4.0.14 - debug: 4.3.7(supports-color@8.1.1) - flatted: 3.3.1 - rfdc: 1.3.1 - streamroller: 3.1.5 - transitivePeerDependencies: - - supports-color - longest-streak@3.1.0: {} loose-envify@1.4.0: @@ -16977,8 +16392,6 @@ snapshots: map-obj@4.3.0: {} - map-stream@0.1.0: {} - markdown-extensions@2.0.0: {} markdown-it@14.1.0: @@ -17565,8 +16978,6 @@ snapshots: dependencies: mime-db: 1.53.0 - mime@2.6.0: {} - mimic-fn@2.1.0: {} mimic-fn@4.0.0: {} @@ -17648,35 +17059,8 @@ snapshots: minipass: 3.3.6 yallist: 4.0.0 - mkdirp@0.5.6: - dependencies: - minimist: 1.2.8 - mkdirp@1.0.4: {} - mocha@10.8.2: - dependencies: - ansi-colors: 4.1.3 - browser-stdout: 1.3.1 - chokidar: 3.6.0 - debug: 4.3.7(supports-color@8.1.1) - diff: 5.2.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 8.1.0 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 5.1.6 - ms: 2.1.3 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.5.1 - yargs: 16.2.0 - yargs-parser: 20.2.9 - yargs-unparser: 2.0.0 - mocha@11.0.1: dependencies: ansi-colors: 4.1.3 @@ -18106,10 +17490,6 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.0.0 - on-finished@2.3.0: - dependencies: - ee-first: 1.1.1 - on-finished@2.4.1: dependencies: ee-first: 1.1.1 @@ -18419,10 +17799,6 @@ snapshots: pathval@2.0.0: {} - pause-stream@0.0.11: - dependencies: - through: 2.3.8 - picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -18647,10 +18023,6 @@ snapshots: proxy-from-env@1.1.0: {} - ps-tree@1.2.0: - dependencies: - event-stream: 3.3.4 - psl@1.9.0: {} publint@0.2.12: @@ -18663,10 +18035,6 @@ snapshots: punycode@2.3.1: {} - q@1.5.1: {} - - qjobs@1.2.0: {} - qs@6.13.0: dependencies: side-channel: 1.1.0 @@ -18679,8 +18047,6 @@ snapshots: quick-lru@4.0.1: {} - rambda@7.5.0: {} - randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 @@ -18689,13 +18055,6 @@ snapshots: range-parser@1.2.1: {} - raw-body@2.5.2: - dependencies: - bytes: 3.1.2 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - raw-body@3.0.0: dependencies: bytes: 3.1.2 @@ -19088,16 +18447,6 @@ snapshots: reusify@1.0.4: {} - rfdc@1.3.1: {} - - rimraf@2.5.4: - dependencies: - glob: 7.2.3 - - rimraf@2.7.1: - dependencies: - glob: 7.2.3 - rimraf@3.0.2: dependencies: glob: 7.2.3 @@ -19441,36 +18790,6 @@ snapshots: smart-buffer@4.2.0: {} - socket.io-adapter@2.5.4: - dependencies: - debug: 4.3.7(supports-color@8.1.1) - ws: 8.11.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - - socket.io-parser@4.2.4: - dependencies: - '@socket.io/component-emitter': 3.1.1 - debug: 4.3.7(supports-color@8.1.1) - transitivePeerDependencies: - - supports-color - - socket.io@4.7.5: - dependencies: - accepts: 1.3.8 - base64id: 2.0.0 - cors: 2.8.5 - debug: 4.3.7(supports-color@8.1.1) - engine.io: 6.5.4 - socket.io-adapter: 2.5.4 - socket.io-parser: 4.2.4 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - socks-proxy-agent@8.0.3: dependencies: agent-base: 7.1.3 @@ -19532,10 +18851,6 @@ snapshots: dependencies: readable-stream: 3.6.2 - split@0.3.3: - dependencies: - through: 2.3.8 - split@1.0.1: dependencies: through: 2.3.8 @@ -19552,24 +18867,10 @@ snapshots: stackback@0.0.2: {} - statuses@1.5.0: {} - statuses@2.0.1: {} std-env@3.8.0: {} - stream-combiner@0.0.4: - dependencies: - duplexer: 0.1.2 - - streamroller@3.1.5: - dependencies: - date-format: 4.0.14 - debug: 4.3.7(supports-color@8.1.1) - fs-extra: 8.1.0 - transitivePeerDependencies: - - supports-color - streamsearch@1.1.0: {} strict-event-emitter@0.5.1: {} @@ -19829,10 +19130,6 @@ snapshots: temp-dir@1.0.0: {} - temp-fs@0.9.9: - dependencies: - rimraf: 2.5.4 - terser-webpack-plugin@5.3.11(webpack@5.97.1(webpack-cli@5.1.4(webpack-bundle-analyzer@4.10.2)(webpack@5.97.1))): dependencies: '@jridgewell/trace-mapping': 0.3.25 @@ -20087,8 +19384,6 @@ snapshots: typescript@5.7.2: {} - ua-parser-js@0.7.37: {} - uc.micro@2.1.0: {} uglify-js@3.17.4: @@ -20184,8 +19479,6 @@ snapshots: universal-user-agent@7.0.2: {} - universalify@0.1.2: {} - universalify@0.2.0: {} universalify@2.0.1: {} @@ -20364,8 +19657,6 @@ snapshots: - supports-color - terser - void-elements@2.0.1: {} - w3c-xmlserializer@5.0.0: dependencies: xml-name-validator: 5.0.0 @@ -20424,10 +19715,6 @@ snapshots: optionalDependencies: webpack-bundle-analyzer: 4.10.2 - webpack-merge@4.2.2: - dependencies: - lodash: 4.17.21 - webpack-merge@5.10.0: dependencies: clone-deep: 4.0.1 @@ -20534,10 +19821,6 @@ snapshots: dependencies: isexe: 2.0.0 - which@3.0.1: - dependencies: - isexe: 2.0.0 - which@4.0.0: dependencies: isexe: 3.1.1 @@ -20618,8 +19901,6 @@ snapshots: ws@7.5.9: {} - ws@8.11.0: {} - ws@8.18.0: {} xcase@2.0.1: {} diff --git a/scripts/buildApiDocs/tsconfig.json b/scripts/buildApiDocs/tsconfig.json index 01630f0a81..bffcd608c5 100644 --- a/scripts/buildApiDocs/tsconfig.json +++ b/scripts/buildApiDocs/tsconfig.json @@ -16,7 +16,7 @@ "strict": true, "jsx": "react", - "types": ["node", "mocha"], + "types": ["node"], "paths": { "@mui-internal/api-docs-builder": [ "../../node_modules/@mui/monorepo/packages/api-docs-builder" diff --git a/test/tsconfig.json b/test/tsconfig.json index 8b0168f054..5dbefccfec 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "module": "es2022", "moduleResolution": "Node", - "types": ["vite/client"] + "types": ["vite/client", "vitest/globals"] }, "include": ["e2e/**/*", "regressions/**/*"], "exclude": ["node_modules", "build"] From eda1033fcf741fba0618ca37a41a9e7de4cfc62d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Mon, 6 Jan 2025 14:12:40 +0100 Subject: [PATCH 5/9] Remove describeSkipIf --- .../react/src/accordion/root/AccordionRoot.test.tsx | 12 ++++++------ .../src/alert-dialog/root/AlertDialogRoot.test.tsx | 4 ++-- .../src/collapsible/panel/CollapsiblePanel.test.tsx | 4 ++-- .../src/collapsible/root/CollapsibleRoot.test.tsx | 4 ++-- .../react/src/composite/root/CompositeRoot.test.tsx | 12 +++--------- packages/react/src/dialog/root/DialogRoot.test.tsx | 6 +++--- .../src/number-field/root/NumberFieldRoot.test.tsx | 4 ++-- .../progress/indicator/ProgressIndicator.test.tsx | 3 +-- packages/react/src/radio-group/RadioGroup.test.tsx | 4 ++-- .../src/scroll-area/corner/ScrollAreaCorner.test.tsx | 4 ++-- .../src/scroll-area/root/ScrollAreaRoot.test.tsx | 4 ++-- packages/react/src/slider/root/SliderRoot.test.tsx | 6 +++--- .../react/src/tabs/indicator/TabsIndicator.test.tsx | 4 ++-- packages/react/src/tabs/root/TabsRoot.test.tsx | 6 +++--- packages/react/src/toggle-group/ToggleGroup.test.tsx | 4 ++-- packages/react/src/use-button/useButton.test.tsx | 4 ++-- 16 files changed, 39 insertions(+), 46 deletions(-) diff --git a/packages/react/src/accordion/root/AccordionRoot.test.tsx b/packages/react/src/accordion/root/AccordionRoot.test.tsx index 3c25039372..22eccc23de 100644 --- a/packages/react/src/accordion/root/AccordionRoot.test.tsx +++ b/packages/react/src/accordion/root/AccordionRoot.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeSkipIf, flushMicrotasks } from '@mui/internal-test-utils'; +import { flushMicrotasks } from '@mui/internal-test-utils'; import { DirectionProvider } from '@base-ui-components/react/direction-provider'; import { Accordion } from '@base-ui-components/react/accordion'; import { createRenderer, describeConformance } from '#test-utils'; @@ -282,7 +282,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('keyboard interactions', () => { + describe.skipIf(isJSDOM)('keyboard interactions', () => { ['Enter', 'Space'].forEach((key) => { it(`key: ${key} toggles the Accordion open state`, async () => { const { getByRole, queryByText, user } = await render( @@ -504,7 +504,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: openMultiple', () => { + describe.skipIf(isJSDOM)('prop: openMultiple', () => { it('multiple items can be open by default', async () => { const { getAllByRole, queryByText, user } = await render( @@ -578,7 +578,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('horizontal orientation', () => { + describe.skipIf(isJSDOM)('horizontal orientation', () => { it('ArrowLeft/Right moves focus in horizontal orientation', async () => { const { getAllByRole, user } = await render( @@ -615,7 +615,7 @@ describe('', () => { expect(trigger1).toHaveFocus(); }); - describeSkipIf(isJSDOM)('RTL', () => { + describe.skipIf(isJSDOM)('RTL', () => { it('ArrowLeft/Right is reversed for horizontal accordions in RTL mode', async () => { const { getAllByRole, user } = await render( @@ -656,7 +656,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: onValueChange', () => { + describe.skipIf(isJSDOM)('prop: onValueChange', () => { it('default item value', async () => { const onValueChange = spy(); diff --git a/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx b/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx index 38c643668a..fde4a49022 100644 --- a/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx +++ b/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeSkipIf, screen, waitFor } from '@mui/internal-test-utils'; +import { screen, waitFor } from '@mui/internal-test-utils'; import { AlertDialog } from '@base-ui-components/react/alert-dialog'; import { createRenderer } from '#test-utils'; import { spy } from 'sinon'; @@ -82,7 +82,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('modality', () => { + describe.skipIf(isJSDOM)('modality', () => { it('makes other interactive elements on the page inert when a modal dialog is open and restores them after the dialog is closed', async () => { const { user } = await render(
diff --git a/packages/react/src/collapsible/panel/CollapsiblePanel.test.tsx b/packages/react/src/collapsible/panel/CollapsiblePanel.test.tsx index 7e9384d49a..5868556389 100644 --- a/packages/react/src/collapsible/panel/CollapsiblePanel.test.tsx +++ b/packages/react/src/collapsible/panel/CollapsiblePanel.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { act, describeSkipIf, fireEvent, flushMicrotasks } from '@mui/internal-test-utils'; +import { act, fireEvent, flushMicrotasks } from '@mui/internal-test-utils'; import { Collapsible } from '@base-ui-components/react/collapsible'; import { createRenderer, describeConformance } from '#test-utils'; import { NOOP } from '../../utils/noop'; @@ -87,7 +87,7 @@ describe('', () => { }); // we test firefox in browserstack which does not support this yet - describeSkipIf(!('onbeforematch' in window) || isJSDOM)('prop: hiddenUntilFound', () => { + describe.skipIf(!('onbeforematch' in window) || isJSDOM)('prop: hiddenUntilFound', () => { it('uses `hidden="until-found" to hide panel when true', async function test() { const handleOpenChange = spy(); diff --git a/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx b/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx index b351484c3a..9e68ec1ec0 100644 --- a/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx +++ b/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; import { expect } from 'chai'; -import { describeSkipIf, flushMicrotasks } from '@mui/internal-test-utils'; +import { flushMicrotasks } from '@mui/internal-test-utils'; import { Collapsible } from '@base-ui-components/react/collapsible'; import { createRenderer, describeConformance } from '#test-utils'; @@ -116,7 +116,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('keyboard interactions', () => { + describe.skipIf(isJSDOM)('keyboard interactions', () => { ['Enter', 'Space'].forEach((key) => { it(`key: ${key} should toggle the Collapsible`, async () => { const { queryByText, getByRole, user } = await render( diff --git a/packages/react/src/composite/root/CompositeRoot.test.tsx b/packages/react/src/composite/root/CompositeRoot.test.tsx index 1bae97ceb1..05233e590e 100644 --- a/packages/react/src/composite/root/CompositeRoot.test.tsx +++ b/packages/react/src/composite/root/CompositeRoot.test.tsx @@ -1,12 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { - act, - createRenderer, - describeSkipIf, - fireEvent, - flushMicrotasks, -} from '@mui/internal-test-utils'; +import { act, createRenderer, fireEvent, flushMicrotasks } from '@mui/internal-test-utils'; import { CompositeItem } from '../item/CompositeItem'; import { CompositeRoot } from './CompositeRoot'; @@ -154,7 +148,7 @@ describe('Composite', () => { }); }); - describeSkipIf(isJSDOM)('rtl', () => { + describe.skipIf(isJSDOM)('rtl', () => { it('horizontal orientation', async () => { const { getByTestId } = render(
@@ -334,7 +328,7 @@ describe('Composite', () => { expect(getByTestId('9')).to.have.attribute('tabindex', '0'); }); - describeSkipIf(isJSDOM)('rtl', () => { + describe.skipIf(isJSDOM)('rtl', () => { it('horizontal orientation', async () => { const { getByTestId } = render(
diff --git a/packages/react/src/dialog/root/DialogRoot.test.tsx b/packages/react/src/dialog/root/DialogRoot.test.tsx index 09640ed511..e3773f214c 100644 --- a/packages/react/src/dialog/root/DialogRoot.test.tsx +++ b/packages/react/src/dialog/root/DialogRoot.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { act, fireEvent, screen, waitFor, describeSkipIf } from '@mui/internal-test-utils'; +import { act, fireEvent, screen, waitFor } from '@mui/internal-test-utils'; import { Dialog } from '@base-ui-components/react/dialog'; import { createRenderer } from '#test-utils'; import { Menu } from '@base-ui-components/react/menu'; @@ -232,7 +232,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: modal', () => { + describe.skipIf(isJSDOM)('prop: modal', () => { it('makes other interactive elements on the page inert when a modal dialog is open and restores them after the dialog is closed', async () => { const { user } = await render(
@@ -444,7 +444,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('nested popups', () => { + describe.skipIf(isJSDOM)('nested popups', () => { it('should not dismiss the dialog when dismissing outside a nested modal menu', async () => { const { user } = await render( diff --git a/packages/react/src/number-field/root/NumberFieldRoot.test.tsx b/packages/react/src/number-field/root/NumberFieldRoot.test.tsx index ae76e35727..edfc388637 100644 --- a/packages/react/src/number-field/root/NumberFieldRoot.test.tsx +++ b/packages/react/src/number-field/root/NumberFieldRoot.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { act, screen, fireEvent, describeSkipIf } from '@mui/internal-test-utils'; +import { act, screen, fireEvent } from '@mui/internal-test-utils'; import { NumberField as NumberFieldBase } from '@base-ui-components/react/number-field'; import { createRenderer, describeConformance } from '#test-utils'; @@ -487,7 +487,7 @@ describe('', () => { }); }); - describeSkipIf(/jsdom/.test(window.navigator.userAgent))('pasting', () => { + describe.skipIf(/jsdom/.test(window.navigator.userAgent))('pasting', () => { it('should allow pasting a valid number', async () => { await render(); const input = screen.getByRole('textbox'); diff --git a/packages/react/src/progress/indicator/ProgressIndicator.test.tsx b/packages/react/src/progress/indicator/ProgressIndicator.test.tsx index ae1721bace..8f26765134 100644 --- a/packages/react/src/progress/indicator/ProgressIndicator.test.tsx +++ b/packages/react/src/progress/indicator/ProgressIndicator.test.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; import { Progress } from '@base-ui-components/react/progress'; -import { describeSkipIf } from '@mui/internal-test-utils'; import { createRenderer, describeConformance } from '#test-utils'; import { ProgressRootContext } from '../root/ProgressRootContext'; @@ -31,7 +30,7 @@ describe('', () => { refInstanceof: window.HTMLSpanElement, })); - describeSkipIf(isJSDOM)('internal styles', () => { + describe.skipIf(isJSDOM)('internal styles', () => { it('determinate', async () => { const { getByTestId } = await render( diff --git a/packages/react/src/radio-group/RadioGroup.test.tsx b/packages/react/src/radio-group/RadioGroup.test.tsx index c53123d20a..4f62d6904c 100644 --- a/packages/react/src/radio-group/RadioGroup.test.tsx +++ b/packages/react/src/radio-group/RadioGroup.test.tsx @@ -7,7 +7,7 @@ import { } from '@base-ui-components/react/direction-provider'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { createRenderer, act, screen, fireEvent, describeSkipIf } from '@mui/internal-test-utils'; +import { createRenderer, act, screen, fireEvent } from '@mui/internal-test-utils'; import { describeConformance } from '../../test/describeConformance'; const isJSDOM = /jsdom/.test(window.navigator.userAgent); @@ -232,7 +232,7 @@ describe('', () => { ].forEach((entry) => { const [direction, horizontalNextKey, horizontalPrevKey] = entry; - describeSkipIf(isJSDOM && direction === 'rtl')(direction, () => { + describe.skipIf(isJSDOM && direction === 'rtl')(direction, () => { it(direction, async () => { const { user } = await render( diff --git a/packages/react/src/scroll-area/corner/ScrollAreaCorner.test.tsx b/packages/react/src/scroll-area/corner/ScrollAreaCorner.test.tsx index 758b72089f..bd6f43df67 100644 --- a/packages/react/src/scroll-area/corner/ScrollAreaCorner.test.tsx +++ b/packages/react/src/scroll-area/corner/ScrollAreaCorner.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { ScrollArea } from '@base-ui-components/react/scroll-area'; import { expect } from 'chai'; -import { screen, describeSkipIf } from '@mui/internal-test-utils'; +import { screen } from '@mui/internal-test-utils'; import { createRenderer } from '#test-utils'; import { describeConformance } from '../../../test/describeConformance'; @@ -17,7 +17,7 @@ describe('', () => { }, })); - describeSkipIf(isJSDOM)('interactions', () => { + describe.skipIf(isJSDOM)('interactions', () => { it('should apply correct corner size when both scrollbars are present', async () => { await render( diff --git a/packages/react/src/scroll-area/root/ScrollAreaRoot.test.tsx b/packages/react/src/scroll-area/root/ScrollAreaRoot.test.tsx index a531d289e0..45b545c5a7 100644 --- a/packages/react/src/scroll-area/root/ScrollAreaRoot.test.tsx +++ b/packages/react/src/scroll-area/root/ScrollAreaRoot.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { ScrollArea } from '@base-ui-components/react/scroll-area'; -import { screen, describeSkipIf } from '@mui/internal-test-utils'; +import { screen } from '@mui/internal-test-utils'; import { createRenderer } from '#test-utils'; import { expect } from 'chai'; import { describeConformance } from '../../../test/describeConformance'; @@ -20,7 +20,7 @@ describe('', () => { render, })); - describeSkipIf(isJSDOM)('interactions', () => { + describe.skipIf(isJSDOM)('interactions', () => { it('should correctly set thumb height and width based on scrollable content', async () => { await render( diff --git a/packages/react/src/slider/root/SliderRoot.test.tsx b/packages/react/src/slider/root/SliderRoot.test.tsx index 60c9f954fb..de6ee597ac 100644 --- a/packages/react/src/slider/root/SliderRoot.test.tsx +++ b/packages/react/src/slider/root/SliderRoot.test.tsx @@ -1,7 +1,7 @@ import { expect } from 'chai'; import * as React from 'react'; import { spy, stub } from 'sinon'; -import { act, describeSkipIf, fireEvent, screen } from '@mui/internal-test-utils'; +import { act, fireEvent, screen } from '@mui/internal-test-utils'; import { DirectionProvider } from '@base-ui-components/react/direction-provider'; import { Slider } from '@base-ui-components/react/slider'; import { createRenderer, describeConformance } from '#test-utils'; @@ -64,7 +64,7 @@ function TestRangeSlider(props: SliderRoot.Props) { ); } -describeSkipIf(typeof Touch === 'undefined')('', () => { +describe.skipIf(typeof Touch === 'undefined')('', () => { beforeAll(function beforeHook() { // PointerEvent not fully implemented in jsdom, causing // fireEvent.pointer* to ignore options @@ -166,7 +166,7 @@ describeSkipIf(typeof Touch === 'undefined')('', () => { }); }); - describeSkipIf(isJSDOM)('rtl', () => { + describe.skipIf(isJSDOM)('rtl', () => { it('should handle RTL', async () => { const handleValueChange = spy(); const { getByTestId } = await render( diff --git a/packages/react/src/tabs/indicator/TabsIndicator.test.tsx b/packages/react/src/tabs/indicator/TabsIndicator.test.tsx index 095708f086..c5a15eb850 100644 --- a/packages/react/src/tabs/indicator/TabsIndicator.test.tsx +++ b/packages/react/src/tabs/indicator/TabsIndicator.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { Tabs } from '@base-ui-components/react/tabs'; -import { describeSkipIf, waitFor } from '@mui/internal-test-utils'; +import { waitFor } from '@mui/internal-test-utils'; import { createRenderer, describeConformance } from '#test-utils'; describe('', () => { @@ -22,7 +22,7 @@ describe('', () => { testRenderPropWith: 'div', })); - describeSkipIf(/jsdom/.test(window.navigator.userAgent))('rendering', () => { + describe.skipIf(/jsdom/.test(window.navigator.userAgent))('rendering', () => { it('should not render when no tab is selected', async () => { const { queryByTestId } = await render( diff --git a/packages/react/src/tabs/root/TabsRoot.test.tsx b/packages/react/src/tabs/root/TabsRoot.test.tsx index 619384abc3..69a84f0c53 100644 --- a/packages/react/src/tabs/root/TabsRoot.test.tsx +++ b/packages/react/src/tabs/root/TabsRoot.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { act, describeSkipIf, flushMicrotasks, fireEvent, screen } from '@mui/internal-test-utils'; +import { act, flushMicrotasks, fireEvent, screen } from '@mui/internal-test-utils'; import { DirectionProvider, type TextDirection, @@ -279,7 +279,7 @@ describe('', () => { ].forEach((entry) => { const [orientation, direction, previousItemKey, nextItemKey] = entry; - describeSkipIf(isJSDOM && direction === 'rtl')( + describe.skipIf(isJSDOM && direction === 'rtl')( `when focus is on a tab element in a ${orientation} ${direction ?? ''} tablist`, () => { describe(previousItemKey ?? '', () => { @@ -802,7 +802,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('activation direction', () => { + describe.skipIf(isJSDOM)('activation direction', () => { it('should set the `data-activation-direction` attribute on the tabs root with orientation=horizontal', async () => { const { getAllByRole, getByTestId } = await render( diff --git a/packages/react/src/toggle-group/ToggleGroup.test.tsx b/packages/react/src/toggle-group/ToggleGroup.test.tsx index 45d216e606..5471abde15 100644 --- a/packages/react/src/toggle-group/ToggleGroup.test.tsx +++ b/packages/react/src/toggle-group/ToggleGroup.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { act, describeSkipIf, flushMicrotasks } from '@mui/internal-test-utils'; +import { act, flushMicrotasks } from '@mui/internal-test-utils'; import { DirectionProvider, type TextDirection, @@ -220,7 +220,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('keyboard interactions', () => { + describe.skipIf(isJSDOM)('keyboard interactions', () => { [ ['ltr', 'ArrowRight', 'ArrowDown', 'ArrowLeft', 'ArrowUp'], ['rtl', 'ArrowLeft', 'ArrowDown', 'ArrowRight', 'ArrowUp'], diff --git a/packages/react/src/use-button/useButton.test.tsx b/packages/react/src/use-button/useButton.test.tsx index d1c5f987d7..0792153dcc 100644 --- a/packages/react/src/use-button/useButton.test.tsx +++ b/packages/react/src/use-button/useButton.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { act, describeSkipIf, fireEvent } from '@mui/internal-test-utils'; +import { act, fireEvent } from '@mui/internal-test-utils'; import { createRenderer } from '#test-utils'; import { useButton } from '.'; @@ -117,7 +117,7 @@ describe('useButton', () => { }); }); - describeSkipIf(isJSDOM)('server-side rendering', () => { + describe.skipIf(isJSDOM)('server-side rendering', () => { it('should server-side render', async () => { function TestButton(props: React.ButtonHTMLAttributes) { const { disabled, type, ...otherProps } = props; From 19f0a1e2f786b463642abf310ddbcb9f1ca1bb16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Mon, 6 Jan 2025 14:18:16 +0100 Subject: [PATCH 6/9] Remove nyc --- .eslintignore | 1 - .gitignore | 1 - package.json | 12 - .../react/scripts/createPackageManifest.mts | 2 +- pnpm-lock.yaml | 283 ------------------ 5 files changed, 1 insertion(+), 298 deletions(-) diff --git a/.eslintignore b/.eslintignore index b31898281c..a1cc5ab3f8 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,4 @@ .git -.nyc_output /coverage /docs/.next /docs/export diff --git a/.gitignore b/.gitignore index c3ec73d009..863636aef4 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ *.log *.tsbuildinfo /.eslintcache -/.nyc_output /coverage /docs/.env.local /docs/.next diff --git a/package.json b/package.json index 676e5d4eae..7f10c5276f 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,6 @@ "lodash": "^4.17.21", "markdownlint-cli2": "^0.17.1", "nx": "^18.3.5", - "nyc": "^15.1.0", "piscina": "^4.8.0", "postcss": "^8.4.49", "postcss-loader": "^8.1.1", @@ -174,16 +173,5 @@ "@types/node": "^18.19.69", "@types/react": "^19.0.2", "@types/react-dom": "^19.0.2" - }, - "nyc": { - "include": [ - "packages/react/src/**/*.{js,ts,tsx}" - ], - "exclude": [ - "**/*.test.{js,ts,tsx}", - "**/*.test/*" - ], - "sourceMap": false, - "instrument": false } } diff --git a/packages/react/scripts/createPackageManifest.mts b/packages/react/scripts/createPackageManifest.mts index 4125cefac3..e98ad9c317 100644 --- a/packages/react/scripts/createPackageManifest.mts +++ b/packages/react/scripts/createPackageManifest.mts @@ -14,7 +14,7 @@ type TransformedExports = Record< export async function createPackageManifest() { const packageData = await fse.readFile(path.resolve(PROJECT_ROOT, './package.json'), 'utf8'); - const { imports, exports, nyc, scripts, devDependencies, workspaces, ...otherPackageData } = + const { imports, exports, scripts, devDependencies, workspaces, ...otherPackageData } = JSON.parse(packageData); const newPackageData = { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 62b55512a5..202ed017fa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -230,9 +230,6 @@ importers: nx: specifier: ^18.3.5 version: 18.3.5 - nyc: - specifier: ^15.1.0 - version: 15.1.0 piscina: specifier: ^4.8.0 version: 4.8.0 @@ -3748,19 +3745,12 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} - append-transform@2.0.0: - resolution: {integrity: sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==} - engines: {node: '>=8'} - aproba@2.0.0: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} arch@2.2.0: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} - archy@1.0.0: - resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} - arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -4031,10 +4021,6 @@ packages: resolution: {integrity: sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==} engines: {node: ^16.14.0 || >=18.0.0} - caching-transform@4.0.0: - resolution: {integrity: sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==} - engines: {node: '>=8'} - call-bind-apply-helpers@1.0.1: resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} engines: {node: '>= 0.4'} @@ -4207,9 +4193,6 @@ packages: resolution: {integrity: sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - cliui@6.0.0: - resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} - cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} @@ -4607,10 +4590,6 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - default-require-extensions@3.0.1: - resolution: {integrity: sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==} - engines: {node: '>=8'} - defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -4824,9 +4803,6 @@ packages: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} - es6-error@4.1.1: - resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} - esast-util-from-estree@2.0.0: resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==} @@ -5323,9 +5299,6 @@ packages: resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} engines: {node: '>= 0.8'} - fromentries@1.3.2: - resolution: {integrity: sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==} - fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} @@ -5610,10 +5583,6 @@ packages: has-unicode@2.0.1: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - hasha@5.2.2: - resolution: {integrity: sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==} - engines: {node: '>=8'} - hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -6058,9 +6027,6 @@ packages: resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} engines: {node: '>= 0.4'} - is-typedarray@1.0.0: - resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} - is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} @@ -6081,10 +6047,6 @@ packages: resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} engines: {node: '>= 0.4'} - is-windows@1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} - is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} @@ -6117,14 +6079,6 @@ packages: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} - istanbul-lib-hook@3.0.0: - resolution: {integrity: sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==} - engines: {node: '>=8'} - - istanbul-lib-instrument@4.0.3: - resolution: {integrity: sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==} - engines: {node: '>=8'} - istanbul-lib-instrument@5.2.1: resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} engines: {node: '>=8'} @@ -6133,18 +6087,10 @@ packages: resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} engines: {node: '>=10'} - istanbul-lib-processinfo@2.0.3: - resolution: {integrity: sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==} - engines: {node: '>=8'} - istanbul-lib-report@3.0.1: resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} engines: {node: '>=10'} - istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} - istanbul-lib-source-maps@5.0.6: resolution: {integrity: sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==} engines: {node: '>=10'} @@ -6463,9 +6409,6 @@ packages: lodash.find@4.6.0: resolution: {integrity: sha512-yaRZoAV3Xq28F1iafWN1+a0rflOej93l1DQUejs3SZ41h2O9UJBoS9aueGjPDgAl4B6tPC0NuuchLKaDQQ3Isg==} - lodash.flattendeep@4.4.0: - resolution: {integrity: sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==} - lodash.get@4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} @@ -7112,10 +7055,6 @@ packages: node-machine-id@1.1.12: resolution: {integrity: sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ==} - node-preload@0.2.1: - resolution: {integrity: sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==} - engines: {node: '>=8'} - node-releases@2.0.18: resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} @@ -7207,11 +7146,6 @@ packages: '@swc/core': optional: true - nyc@15.1.0: - resolution: {integrity: sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==} - engines: {node: '>=8.9'} - hasBin: true - object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -7361,10 +7295,6 @@ packages: resolution: {integrity: sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q==} engines: {node: '>=8'} - p-map@3.0.0: - resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} - engines: {node: '>=8'} - p-map@4.0.0: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} @@ -7401,10 +7331,6 @@ packages: resolution: {integrity: sha512-RRTnDb2TBG/epPRI2yYXsimO0v3BXC8Yd3ogr1545IaqKK17VGhbWVeGGN+XfCm/08OK8635nH31c8bATkHuSw==} engines: {node: '>=8'} - package-hash@4.0.0: - resolution: {integrity: sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==} - engines: {node: '>=8'} - package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} @@ -7810,10 +7736,6 @@ packages: process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - process-on-spawn@1.0.0: - resolution: {integrity: sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==} - engines: {node: '>=8'} - process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} @@ -8103,10 +8025,6 @@ packages: rehype-recma@1.0.0: resolution: {integrity: sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==} - release-zalgo@1.0.0: - resolution: {integrity: sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==} - engines: {node: '>=4'} - remark-frontmatter@5.0.0: resolution: {integrity: sha512-XTFYvNASMe5iPN0719nPrdItC9aU0ssC4v14mH1BCi1u0n1gAocqcujWUrByftZTbLhRtiKRyjYTSIOcr69UVQ==} @@ -8143,9 +8061,6 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - require-main-filename@2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -8451,10 +8366,6 @@ packages: spawn-command@0.0.2: resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} - spawn-wrap@2.0.0: - resolution: {integrity: sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==} - engines: {node: '>=8'} - spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} @@ -8953,9 +8864,6 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} - typedarray-to-buffer@3.1.5: - resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} @@ -9119,10 +9027,6 @@ packages: resolution: {integrity: sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==} hasBin: true - uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true @@ -9350,9 +9254,6 @@ packages: resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} engines: {node: '>= 0.4'} - which-module@2.0.1: - resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} - which-typed-array@1.1.18: resolution: {integrity: sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==} engines: {node: '>= 0.4'} @@ -9414,9 +9315,6 @@ packages: write-file-atomic@2.4.3: resolution: {integrity: sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==} - write-file-atomic@3.0.3: - resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==} - write-file-atomic@5.0.1: resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -9471,9 +9369,6 @@ packages: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} - y18n@4.0.3: - resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -9493,10 +9388,6 @@ packages: engines: {node: '>= 14'} hasBin: true - yargs-parser@18.1.3: - resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} - engines: {node: '>=6'} - yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -9509,10 +9400,6 @@ packages: resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} engines: {node: '>=10'} - yargs@15.4.1: - resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} - engines: {node: '>=8'} - yargs@16.2.0: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} engines: {node: '>=10'} @@ -12981,16 +12868,10 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 - append-transform@2.0.0: - dependencies: - default-require-extensions: 3.0.1 - aproba@2.0.0: {} arch@2.2.0: {} - archy@1.0.0: {} - arg@5.0.2: {} argparse@1.0.10: @@ -13336,13 +13217,6 @@ snapshots: tar: 6.2.1 unique-filename: 3.0.0 - caching-transform@4.0.0: - dependencies: - hasha: 5.2.2 - make-dir: 3.1.0 - package-hash: 4.0.0 - write-file-atomic: 3.0.3 - call-bind-apply-helpers@1.0.1: dependencies: es-errors: 1.3.0 @@ -13509,12 +13383,6 @@ snapshots: execa: 5.1.1 is-wsl: 2.2.0 - cliui@6.0.0: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 6.2.0 - cliui@7.0.4: dependencies: string-width: 4.2.3 @@ -13925,10 +13793,6 @@ snapshots: deep-is@0.1.4: {} - default-require-extensions@3.0.1: - dependencies: - strip-bom: 4.0.0 - defaults@1.0.4: dependencies: clone: 1.0.4 @@ -14166,8 +14030,6 @@ snapshots: is-date-object: 1.1.0 is-symbol: 1.1.1 - es6-error@4.1.1: {} - esast-util-from-estree@2.0.0: dependencies: '@types/estree-jsx': 1.0.5 @@ -14918,8 +14780,6 @@ snapshots: fresh@2.0.0: {} - fromentries@1.3.2: {} - fs-constants@1.0.0: {} fs-exists-sync@0.1.0: {} @@ -15255,11 +15115,6 @@ snapshots: has-unicode@2.0.1: {} - hasha@5.2.2: - dependencies: - is-stream: 2.0.1 - type-fest: 0.8.1 - hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -15750,8 +15605,6 @@ snapshots: dependencies: which-typed-array: 1.1.18 - is-typedarray@1.0.0: {} - is-unicode-supported@0.1.0: {} is-unicode-supported@2.1.0: {} @@ -15767,8 +15620,6 @@ snapshots: call-bind: 1.0.8 get-intrinsic: 1.2.6 - is-windows@1.0.2: {} - is-wsl@2.2.0: dependencies: is-docker: 2.2.1 @@ -15791,19 +15642,6 @@ snapshots: istanbul-lib-coverage@3.2.2: {} - istanbul-lib-hook@3.0.0: - dependencies: - append-transform: 2.0.0 - - istanbul-lib-instrument@4.0.3: - dependencies: - '@babel/core': 7.26.0 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.2 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - istanbul-lib-instrument@5.2.1: dependencies: '@babel/core': 7.26.0 @@ -15824,29 +15662,12 @@ snapshots: transitivePeerDependencies: - supports-color - istanbul-lib-processinfo@2.0.3: - dependencies: - archy: 1.0.0 - cross-spawn: 7.0.3 - istanbul-lib-coverage: 3.2.2 - p-map: 3.0.0 - rimraf: 3.0.2 - uuid: 8.3.2 - istanbul-lib-report@3.0.1: dependencies: istanbul-lib-coverage: 3.2.2 make-dir: 4.0.0 supports-color: 7.2.0 - istanbul-lib-source-maps@4.0.1: - dependencies: - debug: 4.3.7(supports-color@8.1.1) - istanbul-lib-coverage: 3.2.2 - source-map: 0.6.1 - transitivePeerDependencies: - - supports-color - istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 @@ -16278,8 +16099,6 @@ snapshots: lodash.find@4.6.0: {} - lodash.flattendeep@4.4.0: {} - lodash.get@4.4.2: {} lodash.includes@4.3.0: {} @@ -17252,10 +17071,6 @@ snapshots: node-machine-id@1.1.12: {} - node-preload@0.2.1: - dependencies: - process-on-spawn: 1.0.0 - node-releases@2.0.18: {} nopt@7.2.1: @@ -17403,38 +17218,6 @@ snapshots: transitivePeerDependencies: - debug - nyc@15.1.0: - dependencies: - '@istanbuljs/load-nyc-config': 1.1.0 - '@istanbuljs/schema': 0.1.3 - caching-transform: 4.0.0 - convert-source-map: 1.9.0 - decamelize: 1.2.0 - find-cache-dir: 3.3.2 - find-up: 4.1.0 - foreground-child: 2.0.0 - get-package-type: 0.1.0 - glob: 7.2.3 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-hook: 3.0.0 - istanbul-lib-instrument: 4.0.3 - istanbul-lib-processinfo: 2.0.3 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.7 - make-dir: 3.1.0 - node-preload: 0.2.1 - p-map: 3.0.0 - process-on-spawn: 1.0.0 - resolve-from: 5.0.0 - rimraf: 3.0.2 - signal-exit: 3.0.7 - spawn-wrap: 2.0.0 - test-exclude: 6.0.0 - yargs: 15.4.1 - transitivePeerDependencies: - - supports-color - object-assign@4.1.1: {} object-hash@2.2.0: {} @@ -17612,10 +17395,6 @@ snapshots: p-map-series@2.1.0: {} - p-map@3.0.0: - dependencies: - aggregate-error: 3.1.0 - p-map@4.0.0: dependencies: aggregate-error: 3.1.0 @@ -17646,13 +17425,6 @@ snapshots: dependencies: p-reduce: 2.1.0 - package-hash@4.0.0: - dependencies: - graceful-fs: 4.2.11 - hasha: 5.2.2 - lodash.flattendeep: 4.4.0 - release-zalgo: 1.0.0 - package-json-from-dist@1.0.1: {} pacote@18.0.6: @@ -17983,10 +17755,6 @@ snapshots: process-nextick-args@2.0.1: {} - process-on-spawn@1.0.0: - dependencies: - fromentries: 1.3.2 - process@0.11.10: {} proggy@2.0.0: {} @@ -18330,10 +18098,6 @@ snapshots: transitivePeerDependencies: - supports-color - release-zalgo@1.0.0: - dependencies: - es6-error: 4.1.1 - remark-frontmatter@5.0.0: dependencies: '@types/mdast': 4.0.4 @@ -18408,8 +18172,6 @@ snapshots: require-from-string@2.0.2: {} - require-main-filename@2.0.0: {} - requires-port@1.0.0: {} reselect@4.1.8: {} @@ -18824,15 +18586,6 @@ snapshots: spawn-command@0.0.2: {} - spawn-wrap@2.0.0: - dependencies: - foreground-child: 2.0.0 - is-windows: 1.0.2 - make-dir: 3.1.0 - rimraf: 3.0.2 - signal-exit: 3.0.7 - which: 2.0.2 - spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 @@ -19374,10 +19127,6 @@ snapshots: possible-typed-array-names: 1.0.0 reflect.getprototypeof: 1.0.9 - typedarray-to-buffer@3.1.5: - dependencies: - is-typedarray: 1.0.0 - typedarray@0.0.6: {} typescript@5.6.1-rc: {} @@ -19533,8 +19282,6 @@ snapshots: uuid@11.0.3: {} - uuid@8.3.2: {} - uuid@9.0.1: {} v8-to-istanbul@9.2.0: @@ -19802,8 +19549,6 @@ snapshots: is-weakmap: 2.0.2 is-weakset: 2.0.3 - which-module@2.0.1: {} - which-typed-array@1.1.18: dependencies: available-typed-arrays: 1.0.7 @@ -19872,13 +19617,6 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 3.0.7 - write-file-atomic@3.0.3: - dependencies: - imurmurhash: 0.1.4 - is-typedarray: 1.0.0 - signal-exit: 3.0.7 - typedarray-to-buffer: 3.1.5 - write-file-atomic@5.0.1: dependencies: imurmurhash: 0.1.4 @@ -19915,8 +19653,6 @@ snapshots: xtend@4.0.2: {} - y18n@4.0.3: {} - y18n@5.0.8: {} yallist@3.1.1: {} @@ -19927,11 +19663,6 @@ snapshots: yaml@2.4.1: {} - yargs-parser@18.1.3: - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - yargs-parser@20.2.9: {} yargs-parser@21.1.1: {} @@ -19943,20 +19674,6 @@ snapshots: flat: 5.0.2 is-plain-obj: 2.1.0 - yargs@15.4.1: - dependencies: - cliui: 6.0.0 - decamelize: 1.2.0 - find-up: 4.1.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 - string-width: 4.2.3 - which-module: 2.0.1 - y18n: 4.0.3 - yargs-parser: 18.1.3 - yargs@16.2.0: dependencies: cliui: 7.0.4 From 1726a1de48edaa05d50b2a97fc2a8c7f9e0b51eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Wed, 8 Jan 2025 10:14:46 +0100 Subject: [PATCH 7/9] update --- .../alert-dialog/root/AlertDialogRoot.test.tsx | 2 +- .../panel/CollapsiblePanel.test.tsx | 2 +- .../collapsible/root/CollapsibleRoot.test.tsx | 2 +- .../src/dialog/popup/DialogPopup.test.tsx | 4 ++-- .../react/src/dialog/root/DialogRoot.test.tsx | 2 +- packages/react/src/menu/root/MenuRoot.test.tsx | 4 ++-- .../src/popover/root/PopoverRoot.test.tsx | 11 ++--------- .../preview-card/root/PreviewCardRoot.test.tsx | 11 ++--------- .../react/src/select/root/SelectRoot.test.tsx | 12 +++--------- .../src/tooltip/root/TooltipRoot.test.tsx | 11 ++--------- test/regressions/index.test.ts | 18 +++++++++--------- 11 files changed, 26 insertions(+), 53 deletions(-) diff --git a/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx b/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx index 7aaf38975c..0e85d28a21 100644 --- a/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx +++ b/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx @@ -135,7 +135,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: onCloseComplete', () => { + describe.skipIf(isJSDOM)('prop: onCloseComplete', () => { it('is called on close when there is no exit animation defined', async () => { let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/collapsible/panel/CollapsiblePanel.test.tsx b/packages/react/src/collapsible/panel/CollapsiblePanel.test.tsx index 5868556389..7efbd900fb 100644 --- a/packages/react/src/collapsible/panel/CollapsiblePanel.test.tsx +++ b/packages/react/src/collapsible/panel/CollapsiblePanel.test.tsx @@ -88,7 +88,7 @@ describe('', () => { // we test firefox in browserstack which does not support this yet describe.skipIf(!('onbeforematch' in window) || isJSDOM)('prop: hiddenUntilFound', () => { - it('uses `hidden="until-found" to hide panel when true', async function test() { + it('uses `hidden="until-found" to hide panel when true', async () => { const handleOpenChange = spy(); const { queryByText } = await render( diff --git a/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx b/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx index 9e68ec1ec0..b8d77691f2 100644 --- a/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx +++ b/packages/react/src/collapsible/root/CollapsibleRoot.test.tsx @@ -36,7 +36,7 @@ describe('', () => { }); describe('open state', () => { - it('controlled mode', async function test() { + it('controlled mode', async () => { const { queryByText, getByRole, setProps } = await render( diff --git a/packages/react/src/dialog/popup/DialogPopup.test.tsx b/packages/react/src/dialog/popup/DialogPopup.test.tsx index aee3b0b4dc..49db5ac7a8 100644 --- a/packages/react/src/dialog/popup/DialogPopup.test.tsx +++ b/packages/react/src/dialog/popup/DialogPopup.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { Dialog } from '@base-ui-components/react/dialog'; import { AlertDialog } from '@base-ui-components/react/alert-dialog'; -import { act, describeSkipIf, waitFor, screen } from '@mui/internal-test-utils'; +import { act, waitFor, screen } from '@mui/internal-test-utils'; import { describeConformance, createRenderer } from '#test-utils'; const isJSDOM = /jsdom/.test(window.navigator.userAgent); @@ -217,7 +217,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('nested dialog count', () => { + describe.skipIf(isJSDOM)('nested dialog count', () => { it('provides the number of open nested dialogs as a CSS variable', async () => { const { user } = await render( diff --git a/packages/react/src/dialog/root/DialogRoot.test.tsx b/packages/react/src/dialog/root/DialogRoot.test.tsx index e9887f7990..51145b7034 100644 --- a/packages/react/src/dialog/root/DialogRoot.test.tsx +++ b/packages/react/src/dialog/root/DialogRoot.test.tsx @@ -587,7 +587,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: onCloseComplete', () => { + describe.skipIf(isJSDOM)('prop: onCloseComplete', () => { it('is called on close when there is no exit animation defined', async () => { let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/menu/root/MenuRoot.test.tsx b/packages/react/src/menu/root/MenuRoot.test.tsx index 669e786140..90d961364d 100644 --- a/packages/react/src/menu/root/MenuRoot.test.tsx +++ b/packages/react/src/menu/root/MenuRoot.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { act, flushMicrotasks, waitFor, screen, describeSkipIf } from '@mui/internal-test-utils'; +import { act, flushMicrotasks, waitFor, screen } from '@mui/internal-test-utils'; import { DirectionProvider } from '@base-ui-components/react/direction-provider'; import { Menu } from '@base-ui-components/react/menu'; import userEvent from '@testing-library/user-event'; @@ -879,7 +879,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: onCloseComplete', () => { + describe.skipIf(isJSDOM)('prop: onCloseComplete', () => { it('is called on close when there is no exit animation defined', async () => { let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/popover/root/PopoverRoot.test.tsx b/packages/react/src/popover/root/PopoverRoot.test.tsx index c9348425b8..9b2e698454 100644 --- a/packages/react/src/popover/root/PopoverRoot.test.tsx +++ b/packages/react/src/popover/root/PopoverRoot.test.tsx @@ -1,13 +1,6 @@ import * as React from 'react'; import { Popover } from '@base-ui-components/react/popover'; -import { - act, - describeSkipIf, - fireEvent, - flushMicrotasks, - screen, - waitFor, -} from '@mui/internal-test-utils'; +import { act, fireEvent, flushMicrotasks, screen, waitFor } from '@mui/internal-test-utils'; import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer } from '#test-utils'; @@ -545,7 +538,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: onCloseComplete', () => { + describe.skipIf(isJSDOM)('prop: onCloseComplete', () => { it('is called on close when there is no exit animation defined', async () => { let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx b/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx index 535aea1eea..cad25b4c61 100644 --- a/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx +++ b/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx @@ -1,13 +1,6 @@ import * as React from 'react'; import { PreviewCard } from '@base-ui-components/react/preview-card'; -import { - act, - fireEvent, - screen, - flushMicrotasks, - waitFor, - describeSkipIf, -} from '@mui/internal-test-utils'; +import { act, fireEvent, screen, flushMicrotasks, waitFor } from '@mui/internal-test-utils'; import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer } from '#test-utils'; @@ -505,7 +498,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: onCloseComplete', () => { + describe.skipIf(isJSDOM)('prop: onCloseComplete', () => { it('is called on close when there is no exit animation defined', async () => { let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/select/root/SelectRoot.test.tsx b/packages/react/src/select/root/SelectRoot.test.tsx index 6d80a9a4eb..02efb39e31 100644 --- a/packages/react/src/select/root/SelectRoot.test.tsx +++ b/packages/react/src/select/root/SelectRoot.test.tsx @@ -1,12 +1,6 @@ import * as React from 'react'; import { Select } from '@base-ui-components/react/select'; -import { - describeSkipIf, - fireEvent, - flushMicrotasks, - screen, - waitFor, -} from '@mui/internal-test-utils'; +import { fireEvent, flushMicrotasks, screen, waitFor } from '@mui/internal-test-utils'; import { createRenderer } from '#test-utils'; import { expect } from 'chai'; import { spy } from 'sinon'; @@ -121,7 +115,7 @@ describe('', () => { }); describe('prop: onValueChange', () => { - it('should call onValueChange when an item is selected', async function test() { + it('should call onValueChange when an item is selected', async () => { const handleValueChange = spy(); function App() { @@ -439,7 +433,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: onCloseComplete', () => { + describe.skipIf(isJSDOM)('prop: onCloseComplete', () => { it('is called on close when there is no exit animation defined', async () => { let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/tooltip/root/TooltipRoot.test.tsx b/packages/react/src/tooltip/root/TooltipRoot.test.tsx index 04c29bf2b9..b9b250f191 100644 --- a/packages/react/src/tooltip/root/TooltipRoot.test.tsx +++ b/packages/react/src/tooltip/root/TooltipRoot.test.tsx @@ -1,13 +1,6 @@ import * as React from 'react'; import { Tooltip } from '@base-ui-components/react/tooltip'; -import { - act, - describeSkipIf, - fireEvent, - flushMicrotasks, - screen, - waitFor, -} from '@mui/internal-test-utils'; +import { act, fireEvent, flushMicrotasks, screen, waitFor } from '@mui/internal-test-utils'; import { expect } from 'chai'; import { spy } from 'sinon'; import { createRenderer } from '#test-utils'; @@ -404,7 +397,7 @@ describe('', () => { }); }); - describeSkipIf(isJSDOM)('prop: onCloseComplete', () => { + describe.skipIf(isJSDOM)('prop: onCloseComplete', () => { it('is called on close when there is no exit animation defined', async () => { let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/test/regressions/index.test.ts b/test/regressions/index.test.ts index b864cc00da..2f5542f049 100644 --- a/test/regressions/index.test.ts +++ b/test/regressions/index.test.ts @@ -87,20 +87,20 @@ describe('visual regressions', () => { }); }); - after(async () => { + afterAll(async () => { await browser.close(); }); routes.forEach((route: string, index: number) => { - it(`creates screenshots of ${route}`, async function test() { + it( + `creates screenshots of ${route}`, // With the playwright inspector we might want to call `page.pause` which would lead to a timeout. - if (process.env.PWDEBUG) { - this?.timeout(0); - } + { timeout: process.env.PWDEBUG ? 0 : 5000 }, + async () => { + const testcase = await renderFixture(index); - const testcase = await renderFixture(index); - - await takeScreenshot({ testcase, route }); - }); + await takeScreenshot({ testcase, route }); + }, + ); }); }); From 49eb46244adbb27a181c66c4f140416ac29ea390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Wed, 8 Jan 2025 10:45:43 +0100 Subject: [PATCH 8/9] Simplify controlling animations in tests --- .../alert-dialog/root/AlertDialogRoot.test.tsx | 2 +- .../indicator/CheckboxIndicator.test.tsx | 4 ++-- .../react/src/dialog/root/DialogRoot.test.tsx | 8 ++++---- packages/react/src/global.d.ts | 9 +++++++++ .../MenuCheckboxItemIndicator.test.tsx | 4 ++-- .../MenuRadioItemIndicator.test.tsx | 2 +- packages/react/src/menu/root/MenuRoot.test.tsx | 6 +++--- .../src/popover/root/PopoverRoot.test.tsx | 6 +++--- .../preview-card/root/PreviewCardRoot.test.tsx | 6 +++--- .../radio/indicator/RadioIndicator.test.tsx | 4 ++-- .../react/src/select/root/SelectRoot.test.tsx | 6 +++--- .../src/tooltip/root/TooltipRoot.test.tsx | 4 ++-- .../react/src/utils/useAnimationsFinished.ts | 5 +---- packages/react/tsconfig.test.json | 2 +- pnpm-lock.yaml | 3 +++ test/package.json | 1 + test/setupVitest.ts | 18 ++++++++++-------- test/tsconfig.json | 4 ++-- 18 files changed, 53 insertions(+), 41 deletions(-) create mode 100644 packages/react/src/global.d.ts diff --git a/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx b/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx index 0e85d28a21..607aa83523 100644 --- a/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx +++ b/packages/react/src/alert-dialog/root/AlertDialogRoot.test.tsx @@ -169,7 +169,7 @@ describe('', () => { }); it('is called on close when the exit animation finishes', async () => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/checkbox/indicator/CheckboxIndicator.test.tsx b/packages/react/src/checkbox/indicator/CheckboxIndicator.test.tsx index cb828c893f..7a83c8fafc 100644 --- a/packages/react/src/checkbox/indicator/CheckboxIndicator.test.tsx +++ b/packages/react/src/checkbox/indicator/CheckboxIndicator.test.tsx @@ -18,7 +18,7 @@ const testContext = { describe('', () => { beforeEach(() => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = true; + globalThis.BASE_UI_ANIMATIONS_DISABLED = true; }); const { render } = createRenderer(); @@ -132,7 +132,7 @@ describe('', () => { skip(); } - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let animationFinished = false; const notifyAnimationFinished = () => { diff --git a/packages/react/src/dialog/root/DialogRoot.test.tsx b/packages/react/src/dialog/root/DialogRoot.test.tsx index 51145b7034..c2f14e2b7a 100644 --- a/packages/react/src/dialog/root/DialogRoot.test.tsx +++ b/packages/react/src/dialog/root/DialogRoot.test.tsx @@ -11,7 +11,7 @@ const isJSDOM = /jsdom/.test(window.navigator.userAgent); describe('', () => { beforeEach(() => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = true; + globalThis.BASE_UI_ANIMATIONS_DISABLED = true; }); const { render } = createRenderer(); @@ -92,7 +92,7 @@ describe('', () => { skip(); } - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let animationFinished = false; const notifyAnimationFinished = () => { @@ -384,7 +384,7 @@ describe('', () => { skip(); } - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; const notifyTransitionEnd = spy(); @@ -621,7 +621,7 @@ describe('', () => { }); it('is called on close when the exit animation finishes', async () => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/global.d.ts b/packages/react/src/global.d.ts new file mode 100644 index 0000000000..836da4cddd --- /dev/null +++ b/packages/react/src/global.d.ts @@ -0,0 +1,9 @@ +declare global { + /** + * When `true`, disables animation-related code, even if supported by the runtime enviroment. + */ + // eslint-disable-next-line no-var, vars-on-top + var BASE_UI_ANIMATIONS_DISABLED: boolean; +} + +export type {}; diff --git a/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.test.tsx b/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.test.tsx index 977dd9f0e8..0f716c1d99 100644 --- a/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.test.tsx +++ b/packages/react/src/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.test.tsx @@ -6,7 +6,7 @@ import { expect } from 'chai'; describe('', () => { beforeEach(() => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = true; + globalThis.BASE_UI_ANIMATIONS_DISABLED = true; }); const { render } = createRenderer(); @@ -71,7 +71,7 @@ describe('', () => { skip(); } - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let animationFinished = false; const notifyAnimationFinished = () => { diff --git a/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.test.tsx b/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.test.tsx index d78df03c54..52768f4686 100644 --- a/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.test.tsx +++ b/packages/react/src/menu/radio-item-indicator/MenuRadioItemIndicator.test.tsx @@ -76,7 +76,7 @@ describe('', () => { skip(); } - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let animationFinished = false; const notifyAnimationFinished = () => { diff --git a/packages/react/src/menu/root/MenuRoot.test.tsx b/packages/react/src/menu/root/MenuRoot.test.tsx index 90d961364d..3861752820 100644 --- a/packages/react/src/menu/root/MenuRoot.test.tsx +++ b/packages/react/src/menu/root/MenuRoot.test.tsx @@ -11,7 +11,7 @@ const isJSDOM = /jsdom/.test(window.navigator.userAgent); describe('', () => { beforeEach(() => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = true; + globalThis.BASE_UI_ANIMATIONS_DISABLED = true; }); const { render } = createRenderer(); @@ -757,7 +757,7 @@ describe('', () => { skip(); } - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let animationFinished = false; const notifyAnimationFinished = () => { @@ -915,7 +915,7 @@ describe('', () => { }); it('is called on close when the exit animation finishes', async () => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/popover/root/PopoverRoot.test.tsx b/packages/react/src/popover/root/PopoverRoot.test.tsx index 9b2e698454..f3302b6266 100644 --- a/packages/react/src/popover/root/PopoverRoot.test.tsx +++ b/packages/react/src/popover/root/PopoverRoot.test.tsx @@ -14,7 +14,7 @@ function Root(props: Popover.Root.Props) { describe('', () => { beforeEach(() => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = true; + globalThis.BASE_UI_ANIMATIONS_DISABLED = true; }); const { render, clock } = createRenderer(); @@ -227,7 +227,7 @@ describe('', () => { skip(); } - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let animationFinished = false; const notifyAnimationFinished = () => { @@ -574,7 +574,7 @@ describe('', () => { }); it('is called on close when the exit animation finishes', async () => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx b/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx index cad25b4c61..4289e6f366 100644 --- a/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx +++ b/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx @@ -22,7 +22,7 @@ function Trigger(props: PreviewCard.Trigger.Props) { describe('', () => { beforeEach(() => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = true; + globalThis.BASE_UI_ANIMATIONS_DISABLED = true; }); const { render, clock } = createRenderer(); @@ -208,7 +208,7 @@ describe('', () => { animationFinished = true; }; - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; function Test() { const style = ` @@ -534,7 +534,7 @@ describe('', () => { }); it('is called on close when the exit animation finishes', async () => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/radio/indicator/RadioIndicator.test.tsx b/packages/react/src/radio/indicator/RadioIndicator.test.tsx index aa434f47ba..e062cb231f 100644 --- a/packages/react/src/radio/indicator/RadioIndicator.test.tsx +++ b/packages/react/src/radio/indicator/RadioIndicator.test.tsx @@ -7,7 +7,7 @@ import { RadioGroup } from '@base-ui-components/react/radio-group'; describe('', () => { beforeEach(() => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = true; + globalThis.BASE_UI_ANIMATIONS_DISABLED = true; }); const { render } = createRenderer(); @@ -63,7 +63,7 @@ describe('', () => { skip(); } - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let animationFinished = false; const notifyAnimationFinished = () => { diff --git a/packages/react/src/select/root/SelectRoot.test.tsx b/packages/react/src/select/root/SelectRoot.test.tsx index 02efb39e31..fab8b3d937 100644 --- a/packages/react/src/select/root/SelectRoot.test.tsx +++ b/packages/react/src/select/root/SelectRoot.test.tsx @@ -9,7 +9,7 @@ const isJSDOM = /jsdom/.test(window.navigator.userAgent); describe('', () => { beforeEach(() => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = true; + globalThis.BASE_UI_ANIMATIONS_DISABLED = true; }); const { render } = createRenderer(); @@ -252,7 +252,7 @@ describe('', () => { skip(); } - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let animationFinished = false; const notifyAnimationFinished = () => { @@ -469,7 +469,7 @@ describe('', () => { }); it('is called on close when the exit animation finishes', async () => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/tooltip/root/TooltipRoot.test.tsx b/packages/react/src/tooltip/root/TooltipRoot.test.tsx index b9b250f191..4cd088431d 100644 --- a/packages/react/src/tooltip/root/TooltipRoot.test.tsx +++ b/packages/react/src/tooltip/root/TooltipRoot.test.tsx @@ -14,7 +14,7 @@ function Root(props: Tooltip.Root.Props) { describe('', () => { beforeEach(() => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = true; + globalThis.BASE_UI_ANIMATIONS_DISABLED = true; }); const { render, clock } = createRenderer(); @@ -433,7 +433,7 @@ describe('', () => { }); it('is called on close when the exit animation finishes', async () => { - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED = false; + globalThis.BASE_UI_ANIMATIONS_DISABLED = false; let onCloseCompleteCalled = false; function notifyonCloseComplete() { diff --git a/packages/react/src/utils/useAnimationsFinished.ts b/packages/react/src/utils/useAnimationsFinished.ts index cae58f948f..145bd9bbce 100644 --- a/packages/react/src/utils/useAnimationsFinished.ts +++ b/packages/react/src/utils/useAnimationsFinished.ts @@ -25,10 +25,7 @@ export function useAnimationsFinished(ref: React.RefObject) return; } - if ( - typeof element.getAnimations !== 'function' || - (globalThis as any).BASE_UI_ANIMATIONS_DISABLED - ) { + if (typeof element.getAnimations !== 'function' || globalThis.BASE_UI_ANIMATIONS_DISABLED) { fnToExecute(); } else { frameRef.current = requestAnimationFrame(() => { diff --git a/packages/react/tsconfig.test.json b/packages/react/tsconfig.test.json index a154255042..a9f1684beb 100644 --- a/packages/react/tsconfig.test.json +++ b/packages/react/tsconfig.test.json @@ -11,6 +11,6 @@ "outDir": "build-tests", "types": ["vitest/globals", "@types/chai", "@types/chai-dom"] }, - "include": ["src/**/*.spec.ts*", "src/**/*.test.ts*", "src/index.test.js", "test"], + "include": ["src/**/*.spec.ts*", "src/**/*.test.ts*", "src/index.test.js", "test", "src/global.d.ts"], "references": [{ "path": "./tsconfig.build.json" }] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bdfa3fcc67..d2d1df725a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -689,6 +689,9 @@ importers: '@types/chai': specifier: ^4.3.20 version: 4.3.20 + '@types/chai-dom': + specifier: ^1.11.3 + version: 1.11.3 '@types/react': specifier: ^19.0.2 version: 19.0.2 diff --git a/test/package.json b/test/package.json index baf6df1e4c..cde08e96a6 100644 --- a/test/package.json +++ b/test/package.json @@ -12,6 +12,7 @@ "@playwright/test": "1.49.1", "@testing-library/dom": "^10.4.0", "@types/chai": "^4.3.20", + "@types/chai-dom": "^1.11.3", "@types/react": "^19.0.2", "@types/react-dom": "^19.0.2", "@types/sinon": "^17.0.3", diff --git a/test/setupVitest.ts b/test/setupVitest.ts index a63bc2bfa7..cc8995ad04 100644 --- a/test/setupVitest.ts +++ b/test/setupVitest.ts @@ -1,21 +1,23 @@ -import { beforeAll, afterAll, vi } from 'vitest'; +/* eslint-disable no-var */ +/* eslint-disable vars-on-top */ +import { beforeAll, afterAll } from 'vitest'; import chai from 'chai'; - import chaiDom from 'chai-dom'; import chaiPlugin from '@mui/internal-test-utils/chaiPlugin'; +declare global { + var before: typeof beforeAll; + var after: typeof afterAll; + var BASE_UI_ANIMATIONS_DISABLED: boolean; +} + chai.use(chaiDom); chai.use(chaiPlugin); -// @ts-ignore +// required for conformance tests (until everything is migrated to Vite) globalThis.before = beforeAll; -// @ts-ignore globalThis.after = afterAll; -// @ts-ignore -globalThis.vi = vi; - -// @ts-ignore globalThis.BASE_UI_ANIMATIONS_DISABLED = true; const isVitestJsdom = process.env.VITEST_ENV === 'jsdom'; diff --git a/test/tsconfig.json b/test/tsconfig.json index 5dbefccfec..dd8127255e 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -2,9 +2,9 @@ "extends": "../tsconfig.base.json", "compilerOptions": { "module": "es2022", - "moduleResolution": "Node", + "moduleResolution": "bundler", "types": ["vite/client", "vitest/globals"] }, - "include": ["e2e/**/*", "regressions/**/*"], + "include": ["e2e/**/*", "regressions/**/*", "./*.ts"], "exclude": ["node_modules", "build"] } From a56e8b0f5520f85b6d923124643bee566083a1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Wed, 8 Jan 2025 11:05:33 +0100 Subject: [PATCH 9/9] Prettier --- packages/react/tsconfig.test.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/react/tsconfig.test.json b/packages/react/tsconfig.test.json index a9f1684beb..02a8ee1245 100644 --- a/packages/react/tsconfig.test.json +++ b/packages/react/tsconfig.test.json @@ -11,6 +11,12 @@ "outDir": "build-tests", "types": ["vitest/globals", "@types/chai", "@types/chai-dom"] }, - "include": ["src/**/*.spec.ts*", "src/**/*.test.ts*", "src/index.test.js", "test", "src/global.d.ts"], + "include": [ + "src/**/*.spec.ts*", + "src/**/*.test.ts*", + "src/index.test.js", + "test", + "src/global.d.ts" + ], "references": [{ "path": "./tsconfig.build.json" }] }