-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvitest.config.ts
45 lines (37 loc) · 1.13 KB
/
vitest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// ./vitest.config.ts
//
// Global config file for vitest.
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
// Files to include and exclude. Exlusion takes precedence.
include: ["__tests__/**/*.test.ts"],
exclude: ["src", "node_modules", "dist", "playground", "public"],
// Enable globals to avoid redundant imports.
globals: true,
// Enable typescript typechecking.
typecheck: {
enabled: true,
},
// Enable coverage generation and reporting via the
// @vitest/coverage-v8 dev dependency.
coverage: {
enabled: true,
include: ["src/**/*.ts"],
provider: "v8",
// Json and json-summary are required for GitHub vitest coverage report.
// For better debugging, enable generate coverage even on failure.
reporter: ["text", "html", "clover", "json", "json-summary"],
reportOnFailure: true,
reportsDirectory: "coverage",
thresholds: {
statements: 90,
branches: 90,
functions: 90,
lines: 90,
},
},
// Disable watch mode to simplify workflow.
watch: false,
},
});