Skip to content

Commit 3027a1c

Browse files
committed
optimze coverage
1 parent ef8f1eb commit 3027a1c

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

vitest.config.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,21 @@ export default defineConfig({
88
},
99
environment: "jsdom",
1010
coverage: {
11+
provider: "v8",
12+
exclude: [
13+
"dist/**",
14+
"build/**",
15+
"**/*.d.ts",
16+
"scripts/**",
17+
"tests/**",
18+
"**/*.stories.*",
19+
"**/*.test.*",
20+
"node_modules/**",
21+
],
1122
all: true,
12-
reporter: ["text", "html", "clover", "json", "json-summary"],
13-
reportOnFailure: true,
23+
reporter: process.env.CI
24+
? ["clover", "html", "text-summary"] // CI-friendly + fast
25+
: ["text"], // fastest locally
1426
},
1527
globals: true,
1628
setupFiles: "./vitest.setup.ts",

0 commit comments

Comments
 (0)