-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathvitest.config.ts
More file actions
53 lines (51 loc) · 1.58 KB
/
vitest.config.ts
File metadata and controls
53 lines (51 loc) · 1.58 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
import { defineConfig, type UserWorkspaceConfig } from 'vitest/config';
const config: UserWorkspaceConfig = defineConfig({
test: {
pool: 'threads',
isolate: false,
projects: [
'packages/*',
'plugins/*',
'tools/create-egg',
'tegg/core/*',
'tegg/plugin/*',
'tegg/standalone/*',
// FIXME: enable this will cause one test file run twice
// {
// extends: true,
// test: {
// include: ['**/test/**/*.test.ts'],
// exclude: ['**/test/fixtures/**', '**/node_modules/**', '**/dist/**'],
// },
// },
],
coverage: {
provider: 'v8',
exclude: ['**/test/**'],
},
hookTimeout: 20000,
testTimeout: 20000,
env: {
// disable tegg plugins by default on unittest, make test speed up
DISABLE_TEGG_PLUGINS: 'true',
// TODO: aop plugin required this flag, otherwise there will be a SyntaxError: Invalid or unexpected token
NODE_OPTIONS: '--import=tsx/esm',
// FIXME: TypeError: Cannot read properties of undefined (reading 'mode')
// NODE_OPTIONS: '--import=@oxc-node/core/register',
},
// poolOptions: {
// forks: {
// execArgv: [
// // TODO: aop plugin required this flag, otherwise there will be a SyntaxError: Invalid or unexpected token
// '--import=tsx/esm',
// // TODO: TypeScript enum is not supported in strip-only mode
// // '--experimental-transform-types',
// ],
// },
// },
experimental: {
fsModuleCache: true,
},
},
});
export default config;