-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.integration.ts
More file actions
48 lines (47 loc) · 1.12 KB
/
Copy pathvitest.config.integration.ts
File metadata and controls
48 lines (47 loc) · 1.12 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
import react from "@vitejs/plugin-react";
import path from "path";
import { defineConfig } from "vitest/config";
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
test: {
environment: "happy-dom",
setupFiles: ["./src/test/setup.tsx"],
include: ["**/*.integration.test.{ts,tsx}"],
exclude: [
"**/*.e2e.test.{ts,tsx}",
"**/*.extended.test.{ts,tsx}",
"**/node_modules/**",
// Exclude regular unit tests (but not integration tests)
"**/!(*.integration).test.{ts,tsx}",
],
globals: true,
coverage: {
provider: "v8",
reportsDirectory: "./coverage/integration",
reporter: ["text", "lcov", "json-summary"],
include: ["src/**/*.{ts,tsx}"],
exclude: [
"src/**/*.test.{ts,tsx}",
"src/**/*.integration.test.{ts,tsx}",
"src/**/*.e2e.test.{ts,tsx}",
"src/test/**",
"src/main.tsx",
"src/entry-*.tsx",
"src/routeTree.gen.ts",
"src/router.tsx",
"src/types/**",
"src/routes/**",
"src/layout/**",
"src/components/providers/**",
],
all: true,
perFile: true,
skipFull: false,
},
},
});