-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.integration.config.ts
38 lines (36 loc) · 1.15 KB
/
vitest.integration.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
import { configDefaults, defineConfig } from "vitest/config";
import { config } from "dotenv";
import tsconfigPaths from "vite-tsconfig-paths";
import { resolve } from "node:path";
config({ path: resolve(__dirname, ".env") });
export default defineConfig({
plugins: [tsconfigPaths()],
test: {
fileParallelism: false,
testTimeout: 30000,
include: ["./integration/**/*.test.ts"],
setupFiles: ["./integration/setup-env.ts"],
// https://github.com/davelosert/vitest-coverage-report-action
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: 55,
branches: 55,
functions: 55,
statements: 55,
},
exclude: [
...(configDefaults.coverage.exclude as string[]),
"**/*.types.ts",
"**/types.ts",
"lib/*",
],
},
},
resolve: {
alias: [{ find: "@", replacement: resolve(__dirname, "./src") }],
},
});