Skip to content

Commit

Permalink
test: add vitest config
Browse files Browse the repository at this point in the history
  • Loading branch information
exuanbo committed Oct 23, 2024
1 parent d6dbf4f commit 834c601
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"sideEffects": false,
"scripts": {
"build": "tsc && bunchee --sourcemap",
"test": "vitest --coverage --coverage.all=false \"$@\"",
"test": "vitest --coverage \"$@\"",
"lint": "eslint . --fix --cache",
"lint:ci": "eslint . --max-warnings 0 --cache --cache-location ./node_modules/.cache/eslint/.eslintcache",
"format": "prettier \"**/*.{json,md,yml}\" --write --log-level warn --cache",
Expand Down
15 changes: 15 additions & 0 deletions vitest.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {coverageConfigDefaults, defineConfig} from "vitest/config";

// @internal
export default defineConfig({
test: {
coverage: {
all: false,
exclude: [
"src/errors.ts",
"src/utils/invariant.ts",
...coverageConfigDefaults.exclude,
],
},
},
});

0 comments on commit 834c601

Please sign in to comment.