-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
38 lines (36 loc) · 1.26 KB
/
Copy pathvitest.config.ts
File metadata and controls
38 lines (36 loc) · 1.26 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
import { defineConfig } from "vitest/config";
import { resolve, dirname } from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig({
esbuild: {
// Automatic JSX transform for React 17+ components in test files.
// Only activates for .tsx files; no effect on plain .ts tests.
jsx: "automatic",
jsxImportSource: "react",
},
resolve: {
// Resolve internal workspace packages to their TypeScript source so tests
// run without requiring a prior `pnpm build`. The CLI integration tests
// (cli-smoke, cli-verify) still need the compiled binary and therefore
// require `pnpm build` to have run — those are covered by the CI ordering
// (build step runs before test step).
alias: {
"@mcp-release/core": resolve(__dirname, "packages/core/src/index.ts"),
"@mcp-release/reporter": resolve(__dirname, "packages/reporter/src/index.ts"),
},
},
test: {
globals: true,
environment: "node",
include: [
"packages/*/tests/**/*.test.ts",
"fixtures/*/tests/**/*.test.ts",
"apps/*/tests/**/*.test.ts",
"apps/*/tests/**/*.test.tsx",
],
testTimeout: 15000,
hookTimeout: 15000,
pool: "forks",
},
});