Repository navigation
Expand file tree
/
Copy pathvitest.config.ts
More file actions
87 lines (85 loc) · 2.19 KB
/
Copy pathvitest.config.ts
File metadata and controls
87 lines (85 loc) · 2.19 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import path from "node:path";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
coverage: {
provider: "istanbul",
reporter: ["text", "json", "html"],
exclude: [
"**/node_modules/**",
"**/dist/**",
"**/apps/**",
"**/*.config.*",
"**/*.test.*",
"**/tests/**",
"**/template/**",
"**/docs/**",
],
},
projects: [
{
plugins: [tsconfigPaths()],
test: {
name: "playground",
root: "./apps/dev-playground",
environment: "node",
// Playwright owns tests/*.spec.ts; these are isolated server unit tests.
include: ["server/**/*.test.ts"],
},
},
{
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./packages/appkit-ui/src"),
},
},
test: {
name: "appkit-ui",
root: "./packages/appkit-ui",
environment: "jsdom",
},
},
{
plugins: [tsconfigPaths()],
test: {
name: "appkit",
root: "./packages/appkit",
environment: "node",
},
},
{
plugins: [tsconfigPaths()],
test: {
name: "lakebase",
root: "./packages/lakebase",
environment: "node",
},
},
{
plugins: [tsconfigPaths()],
test: {
name: "shared",
root: "./packages/shared",
environment: "node",
},
},
{
plugins: [tsconfigPaths()],
test: {
name: "dev-playground",
root: "./apps/dev-playground",
environment: "node",
// tests/ holds Playwright specs. Vitest's default `**/*.spec.ts`
// glob would collect them and they fail on import with "Playwright
// Test did not expect test.describe() to be called here". They run
// via `pnpm test:integration`.
exclude: ["**/node_modules/**", "**/dist/**", "tests/**"],
},
},
],
},
});