-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathvitest.config.ts
More file actions
52 lines (51 loc) · 1.19 KB
/
vitest.config.ts
File metadata and controls
52 lines (51 loc) · 1.19 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
import { defineConfig } from 'vitest/config';
export default defineConfig({
resolve: {
alias: [
{
// This replicates the Jest moduleNameMapper for handling relative .js imports in ESM
find: /^(\.{1,2}\/.*)\.js$/,
replacement: '$1',
},
],
},
test: {
projects: [
{
extends: true,
test: {
name: 'unit',
include: ['src/**/unit.test.ts'],
},
},
{
extends: true,
test: {
name: 'integration',
include: ['test/**/integration.test.ts', 'test/**/mock.test.ts'],
},
},
{
extends: true,
test: {
name: 'journey',
include: ['test/**/journey.test.ts'],
},
},
],
clearMocks: false,
coverage: {
enabled: false,
provider: 'v8',
reportsDirectory: 'coverage',
exclude: [
// Vitest defaults already exclude node_modules/** and dist/**,
// but explicitly adding your custom ignore for src/proto
'src/proto/**',
...[], // Add any other defaults if needed, but not necessary
],
},
environment: 'node',
testTimeout: 100000,
},
});