-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvitest.config.ts
More file actions
38 lines (36 loc) · 1.01 KB
/
vitest.config.ts
File metadata and controls
38 lines (36 loc) · 1.01 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
import { defineConfig } from "vitest/config";
import path from "node:path";
import { fileURLToPath } from "node:url";
const workspaceRoot = fileURLToPath(new URL(".", import.meta.url));
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(workspaceRoot, "apps/web/src"),
},
},
esbuild: {
jsxInject: 'import React from "react"',
},
test: {
globals: true,
environment: "jsdom",
include: ["apps/web/src/**/*.test.{ts,tsx}", "apps/widget/src/**/*.test.{ts,tsx}"],
exclude: ["**/node_modules/**", "**/dist/**", "**/_generated/**"],
setupFiles: ["./apps/web/src/test/setup.ts", "./apps/widget/src/test/setup.ts"],
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
exclude: [
"node_modules/**",
"**/dist/**",
"**/_generated/**",
"**/*.test.{ts,tsx}",
"**/e2e/**",
],
},
testTimeout: 30000,
env: {
CONVEX_URL: "https://wooden-moose-405.eu-west-1.convex.cloud",
},
},
});