Skip to content

Commit 539fb2b

Browse files
jcfrancobenelan
andauthored
chore: replace jest with vitest (#11270)
**Related Issue:** N/A ## Summary Unifies testing by leveraging existing `vitest` setup. ### Notes - test workflows are mostly unchanged (key change involves imports – see https://vitest.dev/api/) - `jest-axe` is still used as it works with our current Puppeteer setup - [`vitest-axe`](https://github.com/chaance/vitest-axe#readme) is still in prerelease and has a known issue when integrated with `happy-dom` - updates ESLint, Renovate configs, VS Code launch action and _some_ doc - Preact example [still uses jest](https://github.com/Esri/calcite-design-system/blob/dev/examples/components/preact/package.json#L16) – we can tackle this in a follow-up - Moves `vitest` dep to monorepo root (might need to keep under `calcite-components` to ensure Lumina doesn't remove matching triple-slash directives - Removes obsolete `commonTests`-scoped ESLint config --------- Co-authored-by: Ben Elan <[email protected]>
1 parent 03a0aad commit 539fb2b

File tree

28 files changed

+315
-3412
lines changed

28 files changed

+315
-3412
lines changed

.renovaterc.json

-4
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@
88
"schedule": ["before 5am every weekday"],
99
"labels": ["dependencies"],
1010
"ignoreDeps": [
11-
"@types/jest",
1211
"@types/node",
1312
"@types/react",
1413
"@types/react-dom",
15-
"jest",
16-
"jest-cli",
1714
"node",
1815
"npm",
1916
"puppeteer",
2017
"react",
2118
"react-dom",
22-
"ts-jest",
2319
"typescript"
2420
],
2521
"ignorePaths": ["packages/calcite-ui-icons/**", "examples/**"],

.vscode/launch.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@
5959
"name": "Design Tokens Spec Test {currentFile}",
6060
"cwd": "${workspaceFolder}/packages/calcite-design-tokens",
6161
"sourceMaps": true,
62-
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/jest/bin/jest.js", "--runInBand", "${file}"],
63-
"env": {
64-
"NODE_OPTIONS": "--experimental-vm-modules"
65-
},
62+
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/vitest/vitest.mjs", "${file}"],
6663
"skipFiles": ["<node_internals>/**"],
6764
"internalConsoleOptions": "neverOpen",
6865
"console": "integratedTerminal"

0 commit comments

Comments
 (0)