Repository navigation
Expand file tree
/
Copy pathvitest.config.ts
More file actions
65 lines (63 loc) · 1.62 KB
/
Copy pathvitest.config.ts
File metadata and controls
65 lines (63 loc) · 1.62 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { defineConfig } from 'vitest/config'
import { config } from 'dotenv'
const env = config({ path: '.env' })
export default defineConfig({
test: {
globals: true,
environment: 'node',
env: env.parsed,
testTimeout: 300000, // 5 minutes for long-running tests
include: ['**/*.test.ts', '**/*.test.tsx'],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/build/**',
'**/.next/**',
'**/.turbo/**',
'**/coverage/**',
'**/.git/**',
'**/examples/**/node_modules/**',
// Exclude deeply nested paths that cause ENAMETOOLONG
'**/node_modules/.pnpm/node_modules/**',
'**/examples/minimal/node_modules/**',
],
pool: 'forks',
poolOptions: {
forks: {
maxForks: 4,
minForks: 1,
},
},
// Workspace projects configuration
projects: [
// Root tests
{
test: {
include: ['tests/**/*.test.ts'],
name: 'tests',
environment: 'node',
},
},
// Package configurations
'packages/*/vitest.config.ts',
'packages/*/*/vitest.config.ts',
// Examples
{
test: {
include: ['examples/**/test/**/*.test.ts', 'examples/**/*.test.ts'],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/build/**',
'**/.next/**',
// Specifically exclude problematic nested paths
'**/examples/minimal/node_modules/**',
'**/mdxe-esbuild-example/**',
],
name: 'examples',
environment: 'node',
},
},
],
},
})