-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvitest.config.ts
More file actions
37 lines (36 loc) · 1.09 KB
/
vitest.config.ts
File metadata and controls
37 lines (36 loc) · 1.09 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
import tsconfigPaths from "vite-tsconfig-paths";
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
// Common test config that apply to all projects
testTimeout: 0,
hookTimeout: 30000,
coverage: {
provider: "v8",
reportOnFailure: true,
reporter: ["text", "json-summary", "json"],
include: ["packages/api/src/**/*.{js,ts}"],
exclude: ["**/node_modules/**", "**/dist/**", "**/*.test.js", "**/*.spec.js", "**/tests/**"],
},
projects: [
{
plugins: [tsconfigPaths()],
test: {
name: "unit",
include: ["packages/api/tests/01-unit/**/*.test.ts"],
},
},
{
plugins: [tsconfigPaths()],
test: {
name: "integration",
include: ["packages/api/tests/02-integration/**/*.test.ts"],
globalSetup: "./vitest.global-setup.ts",
},
},
],
// Force vitest to run the test suite with 1 worker to avoid nilchain sequence mismatches
// ref: https://github.com/NillionNetwork/nildb/issues/174
maxWorkers: 1,
},
});