-
Notifications
You must be signed in to change notification settings - Fork 6
/
vitest.config.ts
39 lines (38 loc) · 988 Bytes
/
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
import react from "@vitejs/plugin-react-swc";
import tsconfigPaths from "vite-tsconfig-paths";
import {
configDefaults,
coverageConfigDefaults,
defineConfig,
} from "vitest/config";
export default defineConfig({
plugins: [tsconfigPaths(), react()],
test: {
globals: true,
environmentMatchGlobs: [
["convex/**", "edge-runtime"],
["**", "jsdom"],
],
include: ["src/**/*.{test,spec}.{ts,tsx}"],
exclude: [...configDefaults.exclude, "e2e/**"],
coverage: {
reporter: ["text", "json-summary", "json"],
reportOnFailure: true,
include: ["src/**", "convex/**"],
exclude: [
...coverageConfigDefaults.exclude,
"**/*.config.?(c|m)[jt]s?(x)",
"convex/_generated/**",
"src/routeTree.gen.ts",
"**/*.stories.tsx",
"src/components/**/index.ts",
],
},
setupFiles: ["./vitest.setup.ts"],
server: {
deps: {
inline: ["convex-test"],
},
},
},
});