-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.ts
More file actions
50 lines (48 loc) · 1.76 KB
/
Copy pathvitest.config.ts
File metadata and controls
50 lines (48 loc) · 1.76 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
import { fileURLToPath } from 'node:url';
import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
const rootDir = fileURLToPath(new URL('.', import.meta.url));
const srcDir = resolve(rootDir, 'src');
export default defineConfig({
resolve: {
alias: [
{ find: /^@models$/, replacement: resolve(srcDir, 'models', 'index.ts') },
{ find: /^@models\/(.*)$/, replacement: `${resolve(srcDir, 'models')}/$1` },
{ find: /^@utils$/, replacement: resolve(srcDir, 'utils', 'index.ts') },
{ find: /^@utils\/(.*)$/, replacement: `${resolve(srcDir, 'utils')}/$1` },
{ find: /^@output$/, replacement: resolve(srcDir, 'output', 'index.ts') },
{ find: /^@output\/(.*)$/, replacement: `${resolve(srcDir, 'output')}/$1` },
{ find: /^@commands\/(.*)$/, replacement: `${resolve(srcDir, 'commands')}/$1` },
{ find: /^@mcp\/(.*)$/, replacement: `${resolve(srcDir, 'mcp')}/$1` },
{ find: /^@client$/, replacement: resolve(srcDir, 'client.ts') },
{ find: /^@config$/, replacement: resolve(srcDir, 'config.ts') },
{ find: /^@errors$/, replacement: resolve(srcDir, 'errors.ts') },
],
},
test: {
globals: true,
environment: 'node',
include: [
'tests/**/*.test.ts',
'tests/integration/**/*.test.ts',
'tests/e2e/**/*.test.ts',
'tests/property/**/*.test.ts',
'tests/hypothesis/**/*.test.ts',
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
exclude: ['node_modules', 'dist', 'tests/', '*.config.*'],
thresholds: {
global: {
branches: 60,
functions: 60,
lines: 60,
statements: 60,
},
},
},
testTimeout: 30000,
setupFiles: ['./tests/setup.ts'],
},
});