Skip to content

Commit

Permalink
chore: add test coverage (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlzzen authored Sep 6, 2024
1 parent 8333404 commit e51da94
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"scripts": {
"dev": "rollup --config rollup.config.mts --configPlugin swc3 --watch",
"build": "rollup --config rollup.config.mts --configPlugin swc3",
"test": "vitest"
"test": "vitest",
"coverage": "vitest run --coverage"
},
"exports": {
".": {
Expand Down
10 changes: 8 additions & 2 deletions vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
watch: false,
testTimeout: 8000
}
testTimeout: 8000,
coverage: {
include: [
'__tests__/**/*.{test,spec}.ts'
],
exclude: ['**/node_modules/**', '**/example/**', '**/dist/**', '**/cypress/**', '**/.{idea,git,cache,output,temp}/**', '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*']
}
},
})

0 comments on commit e51da94

Please sign in to comment.