Skip to content

Commit

Permalink
build(setup): Unit tests can run succesfully with coverage output
Browse files Browse the repository at this point in the history
  • Loading branch information
joerideg committed Jul 2, 2024
1 parent aeb9cf1 commit 2f73b98
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 21 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"eslint-plugin-storybook": "^0.8.0",
"happy-dom": "^14.12.3",
"husky": "^9.0.11",
"plop": "^4.0.1",
"prettier": "^3.2.5",
Expand Down
52 changes: 39 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,4 @@
"allowSyntheticDefaultImports": true
},
"include": ["src", "vite.config.ts"],
"exclude": [
"node_modules",
"dist",
"coverage",
"stories",
"**/*/*.(test|spec).*",
],
}
8 changes: 7 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ export default defineConfig({
},
plugins: [react(), dts({ insertTypesEntry: true })],
test: {
environment: 'happy-dom',
passWithNoTests: true,
coverage: {
enabled: false,
provider: 'istanbul',
exclude: ['**/*.mock.ts'],
include: ['src'],
exclude: [
'**/*/*.stories.*',
'**/*.mock.ts'
],
},
include: ['**/*.spec.ts?(x)'],
},
})

0 comments on commit 2f73b98

Please sign in to comment.