-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.js
38 lines (33 loc) · 1.17 KB
/
vitest.config.js
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
import path from 'node:path';
import { defineConfig } from 'vitest/config';
process.env.TZ = 'UTC';
const packageDirectory = (pkg, ...rest) => {
return path.resolve(__dirname, 'packages', pkg, ...rest);
};
const packageSource = (pkg, ...rest) => {
return path.resolve(packageDirectory(pkg, 'src', ...rest));
};
export default defineConfig({
test: {
watch: false,
testTimeout: 15000,
hookTimeout: 15000,
threads: false,
setupFiles: [packageDirectory('shared', 'vitest.setup.ts'), packageSource('common', 'vitest.setup.ts')],
reporters: ['verbose'],
alias: {
'@shakala/common': packageSource('common'),
'@shakala/email': packageSource('email'),
'@shakala/notification': packageSource('notification'),
'@shakala/persistence/test': packageSource('persistence', 'index.test.ts'),
'@shakala/persistence': packageSource('persistence'),
'@shakala/shared/vitest.setup': packageDirectory('shared', 'vitest.setup.ts'),
'@shakala/shared': packageSource('shared'),
'@shakala/thread': packageSource('thread'),
'@shakala/user': packageSource('user'),
},
deps: {
registerNodeLoader: true,
},
},
});