forked from unkarelian/openvault
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvitest.config.js
More file actions
36 lines (34 loc) · 1.43 KB
/
vitest.config.js
File metadata and controls
36 lines (34 loc) · 1.43 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
import path from 'path';
import { fileURLToPath } from 'url';
import { defineConfig } from 'vitest/config';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
test: {
environment: 'jsdom',
globals: true,
include: ['tests/**/*.test.js'],
setupFiles: ['./tests/setup.js'],
// Watch mode disabled
watch: false,
// Fail fast during development (CI runs all)
bail: process.env.CI ? 0 : 3,
// Reporter: verbose locally, dot in CI
reporter: process.env.CI ? 'dot' : 'verbose',
// Thread pool for parallel execution (Vitest 4+ top-level options)
pool: 'threads',
maxThreads: 4,
minThreads: 1,
// Test timeout (generous for JSDOM + LLM mocks)
testTimeout: 10000,
},
resolve: {
alias: {
'../../../../extensions.js': path.resolve(__dirname, 'tests/stubs/extensions.js'),
'../../../../../extensions.js': path.resolve(__dirname, 'tests/stubs/extensions.js'),
'../../../../../../extensions.js': path.resolve(__dirname, 'tests/stubs/extensions.js'),
'../../../../../script.js': path.resolve(__dirname, 'tests/stubs/extensions.js'),
'../../../../../../script.js': path.resolve(__dirname, 'tests/stubs/extensions.js'),
'../../../shared.js': path.resolve(__dirname, 'tests/stubs/shared.js'),
},
},
});