-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvitest.config.ts
More file actions
53 lines (52 loc) · 1.42 KB
/
vitest.config.ts
File metadata and controls
53 lines (52 loc) · 1.42 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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'node', // Use node for all tests (no CORS issues)
globals: true,
setupFiles: ['./src/test/setup.ts'],
include: ['src/test/**/*.test.ts'],
testTimeout: 120000,
hookTimeout: 120000,
env: {
NODE_ENV: 'test'
},
// Debugging configuration
pool: process.env.NODE_ENV === 'debug' ? 'forks' : 'threads',
poolOptions: {
forks: {
singleFork: true
}
},
// Coverage configuration
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'json-summary'],
exclude: [
'node_modules/**',
'lib/**',
'coverage/**',
'**/*.test.ts',
'**/test/**',
'vitest.config.ts',
'eslint.config.mjs',
'**/*.d.ts',
'src/types/**/*.ts',
'src/itwins-client.ts',
'.changeset/**'
],
thresholds: {
lines: 80,
branches: 80,
functions: 80,
statements: 80
}
}
},
define: {
global: 'globalThis',
}
});