-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvitest.config.ts
37 lines (36 loc) · 1.08 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
import { resolve } from "node:path";
import { configDefaults, defineConfig } from "vitest/config";
export default defineConfig({
test: {
setupFiles: ["./test/setup-env.ts"],
exclude: [...configDefaults.exclude, "./lib/**/*"],
coverage: {
// you can include other reporters, but 'json-summary' is required, json is recommended
reporter: ["text", "json-summary", "json"],
// If you want a coverage reports even if your tests are failing, include the reportOnFailure option
reportOnFailure: true,
thresholds: {
lines: 24,
branches: 72,
functions: 58,
statements: 24,
},
include: ["src/**/*.ts"],
exclude: [
...(configDefaults.coverage.exclude as string[]),
"**/*.types.ts",
"**/types.ts",
"src/__generated__/**/*",
"src/graphql/**/*",
"src/services/**/*",
"src/types/**/*",
"src/abis/**/*",
"./lib/**/*",
"src/cron/**/*",
],
},
},
resolve: {
alias: [{ find: "@", replacement: resolve(__dirname, "./src") }],
},
});