Skip to content

Commit

Permalink
chore: add vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
ingeridhellen committed Sep 5, 2023
1 parent 5263327 commit 6c45021
Show file tree
Hide file tree
Showing 3 changed files with 756 additions and 4 deletions.
5 changes: 4 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"start": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"test": "vitest",
"lint": "yarn eslint --fix --ext .ts,.tsx ."
},
"browserslist": {
Expand Down Expand Up @@ -54,12 +55,14 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"jsdom": "^22.1.0",
"openapi-typescript-codegen": "^0.25.0",
"prettier": "2.8.4",
"typescript": "^4.9.5",
"vite": "^4.4.5",
"vite-plugin-checker": "^0.6.1",
"vite-plugin-svgr": "^3.2.0",
"vite-tsconfig-paths": "^4.2.0"
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.34.3"
}
}
9 changes: 9 additions & 0 deletions web/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'vitest/config'

export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/setupTests.ts',
},
})
Loading

0 comments on commit 6c45021

Please sign in to comment.