-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathvitest.config.ts
More file actions
51 lines (49 loc) · 1.2 KB
/
vitest.config.ts
File metadata and controls
51 lines (49 loc) · 1.2 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
import { defineConfig } from 'vitest/config';
import path from 'path';
const isWindows = process.platform === 'win32';
export default defineConfig({
test: {
globals: true,
environment: 'node',
setupFiles: ['./tests/setup.ts'],
// Run tests sequentially to avoid Firefox port conflicts
fileParallelism: false,
pool: 'forks',
poolOptions: {
forks: {
singleFork: true,
},
},
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
exclude: [
'node_modules/**',
'dist/**',
'old/**',
'**/*.d.ts',
'**/*.config.*',
'**/mockData.ts',
'tests/**',
'scripts/**',
],
thresholds: {
branches: 10,
functions: 10,
lines: 10,
statements: 10,
},
},
include: ['tests/**/*.test.ts'],
// Skip integration tests on Windows due to selenium-webdriver hanging issue
// See: https://github.com/elastic/kibana/issues/52053
exclude: isWindows
? ['node_modules', 'dist', 'tests/integration/**']
: ['node_modules', 'dist'],
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});