-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.integration.config.ts
More file actions
28 lines (24 loc) · 926 Bytes
/
Copy pathvitest.integration.config.ts
File metadata and controls
28 lines (24 loc) · 926 Bytes
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
import { defineConfig } from "vitest/config";
import tsconfigPaths from "vite-tsconfig-paths";
// Crosses a real boundary (DB, API, service-to-service) — slower and fewer
// than unit tests, so kept in a separate config and naming convention
// (*.integration.test.ts) to exclude them from the watch-mode loop.
export default defineConfig({
plugins: [tsconfigPaths()],
test: {
environment: "node",
globals: true,
include: [
"app/**/*.integration.{test,spec}.ts",
"components/**/*.integration.{test,spec}.ts",
"lib/**/*.integration.{test,spec}.ts",
],
setupFiles: ["./vitest.integration.setup.ts"],
// tests share one DB container — run sequentially unless your fixture
// strategy isolates per-test via transactions
fileParallelism: false,
testTimeout: 15000,
hookTimeout: 30000, // container cold-start headroom
bail: process.env.CI ? 1 : 0,
},
});