-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
44 lines (42 loc) · 1.09 KB
/
Copy pathvitest.config.ts
File metadata and controls
44 lines (42 loc) · 1.09 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
import { defineConfig } from "vitest/config";
import { resolve, dirname } from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export default defineConfig({
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./vitest.setup.ts"],
include: [
"__tests__/**/*.{test,spec}.{js,jsx,ts,tsx}",
],
exclude: ["node_modules/", ".next/", "dist/"],
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
exclude: [
"node_modules/",
".next/",
"dist/",
"**/*.d.ts",
"src/app/**/layout.tsx",
"src/app/**/loading.tsx",
"src/app/**/not-found.tsx",
"src/app/**/page.tsx",
"src/components/ui/**",
"**/*.stories.{js,jsx,ts,tsx}",
],
},
server: { deps: { inline: ["convex-test"] } },
},
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
define: {
// Mock import.meta.glob for convex-test compatibility
"import.meta.glob": "(() => ({}))",
},
});