-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
22 lines (21 loc) · 779 Bytes
/
vitest.config.ts
File metadata and controls
22 lines (21 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { defineConfig } from "vitest/config";
import path from "path";
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
test: {
// Use threads for faster parallel test execution
pool: "threads",
// Disable file parallelism for integration tests that share database state.
// This prevents race conditions where one test's beforeEach cleanup
// deletes data that another test is using.
fileParallelism: false,
// Setup file for test matchers (jest-dom for jsdom tests)
setupFiles: ["./tests/setup.ts"],
// Note: Frontend tests use @vitest-environment jsdom comment at the top of files
// to specify jsdom environment. This keeps backend tests in node environment.
},
});