forked from mrsimpson/responsible-vibe-mcp
-
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) · 917 Bytes
/
vitest.config.ts
File metadata and controls
38 lines (36 loc) · 917 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
29
30
31
32
33
34
35
36
37
38
import { defineConfig } from 'vitest/config';
import { existsSync } from 'node:fs';
// Check if custom state machine exists
const hasCustomStateMachine =
existsSync('.vibe/workflow.yml') || existsSync('.vibe/workflow.yaml');
export default defineConfig({
test: {
globals: true,
environment: 'node',
testTimeout: 10000,
setupFiles: ['./test/setup.ts'],
include: ['test/**/*.test.ts'],
exclude: [
'node_modules',
'dist',
// Exclude MCP contract tests if custom state machine is present
...(hasCustomStateMachine
? ['test/e2e/consolidated/mcp-contract.test.ts']
: []),
],
typecheck: {
tsconfig: './tsconfig.test.json',
},
env: {
// Set log level to ERROR for tests by default
LOG_LEVEL: 'ERROR',
NODE_ENV: 'test',
VITEST: 'true',
},
},
resolve: {
alias: {
'@': './src',
},
},
});