-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvitest.config.ts
More file actions
41 lines (40 loc) · 1.44 KB
/
vitest.config.ts
File metadata and controls
41 lines (40 loc) · 1.44 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
import { defineConfig } from "vitest/config";
import { vitestPluginRscSourceConditions } from "./vitest.conditions.ts";
import vitestPluginRscProject from "./packages/vitest-plugin-rsc/vitest.config.ts";
import nextjsNoMswDemoProject from "./playground/nextjs-no-msw-demo/vitest.config.ts";
import { nextjsNotesProjects } from "./playground/nextjs-notes-demo/vitest.config.ts";
import rscVitestDemoProject from "./playground/rsc-vitest-demo/vitest.config.ts";
export default defineConfig({
resolve: {
conditions: vitestPluginRscSourceConditions,
},
test: {
coverage: {
provider: "v8",
reporter: ["text", "html", "lcov"],
include: [
"packages/vitest-plugin-rsc/src/**/*.{ts,tsx}",
"playground/rsc-vitest-demo/src/**/*.{ts,tsx}",
"playground/nextjs-no-msw-demo/**/*.{ts,tsx}",
"playground/nextjs-notes-demo/**/*.{ts,tsx}",
],
exclude: [
"**/.next/**/*",
"**/node_modules/**/*",
"**/*.{test,test-fixture,mock,config}.{ts,tsx}",
"**/*.d.ts",
"**/vitest*.{ts,tsx}",
"playground/nextjs-notes-demo/{db,env,scripts,test}/**/*.{ts,tsx}",
"playground/nextjs-notes-demo/lib/db{,.dev}.ts",
],
},
// oxlint-disable-next-line no-process-env
maxWorkers: process.env.CI ? undefined : 2,
projects: [
vitestPluginRscProject,
rscVitestDemoProject,
nextjsNoMswDemoProject,
...nextjsNotesProjects,
],
},
});