-
-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathvitest.config.ts
More file actions
51 lines (50 loc) · 1.2 KB
/
Copy pathvitest.config.ts
File metadata and controls
51 lines (50 loc) · 1.2 KB
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
46
47
48
49
50
51
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
pool: "threads",
coverage: {
include: [
"src/**/*.ts",
"!src/**/index.ts",
"!src/**/*.spec.ts",
"!**/__mocks__/**",
],
},
projects: [
{
extends: true,
test: {
name: "unit",
environment: "node",
include: ["src/**/*.spec.ts"],
},
},
{
extends: true,
test: {
name: "e2e",
retry: 3,
testTimeout: 60_000,
globalSetup: "./test-utils/vitest-global-setup.ts",
environment: "./test-utils/vitest-environment.ts",
setupFiles: [
"./test-utils/setup-files/vitest-extend-expect.ts",
"./test-utils/setup-files/vitest-polyfills.ts",
"./test-utils/setup-files/vitest-sessions.ts",
],
include: ["tests/**/*.spec.ts"],
},
},
{
extends: true,
test: {
name: "eslint",
environment: "node",
setupFiles: ["./eslint/vitest-eslint-setup.ts"],
include: ["eslint/**/*.spec.js"],
},
},
],
},
});