Skip to content

Commit

Permalink
Vitest 1 (#3397)
Browse files Browse the repository at this point in the history
* [email protected]

* Update JSDOM, add node types

* Option `coverage.all` is now enabled by default

* update deps
  • Loading branch information
amanmahajan7 authored Dec 4, 2023
1 parent 9b977a4 commit 85f55a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,13 @@
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.1.1",
"@types/lodash-es": "^4.17.7",
"@types/node": "^20.10.3",
"@types/react": "^18.2.35",
"@types/react-dom": "^18.2.4",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"@vitejs/plugin-react": "^4.0.2",
"@vitest/coverage-v8": "^0.34.1",
"@vitest/coverage-v8": "^1.0.0",
"babel-plugin-optimize-clsx": "^2.6.2",
"eslint": "^8.43.0",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -89,7 +90,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sonarjs": "^0.23.0",
"eslint-plugin-testing-library": "^6.2.0",
"jsdom": "^23.0.0",
"jsdom": "^23.0.1",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.5.23",
"lodash-es": "^4.17.21",
Expand All @@ -105,7 +106,7 @@
"rollup-plugin-postcss": "^4.0.2",
"typescript": "~5.3.2",
"vite": "^5.0.0",
"vitest": "^0.34.1"
"vitest": "^1.0.0"
},
"peerDependencies": {
"react": "^18.0",
Expand Down
9 changes: 6 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@ export default defineConfig({
test: {
root: '.',
environment: 'jsdom',
experimentalVmThreads: true,
pool: 'vmThreads',
globals: true,
coverage: {
provider: 'v8',
enabled: isCI,
include: ['src/**/*.{ts,tsx}', '!src/types.ts'],
all: true,
reporter: ['text', 'json']
},
useAtomics: true,
poolOptions: {
vmThreads: {
useAtomics: true
}
},
testTimeout: isCI ? 10000 : 5000,
setupFiles: ['test/setup.ts'],
restoreMocks: true,
Expand Down

0 comments on commit 85f55a4

Please sign in to comment.