Repository navigation
Expand file tree
/
Copy pathvitest.config.ts
More file actions
63 lines (62 loc) · 1.67 KB
/
Copy pathvitest.config.ts
File metadata and controls
63 lines (62 loc) · 1.67 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
54
55
56
57
58
59
60
61
62
63
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: false,
include: ['tests/**/*.test.ts'],
exclude: ['tests/orphaned-routers-integration.test.ts'],
testTimeout: 30_000,
hookTimeout: 30_000,
teardownTimeout: 10_000,
retry: 2,
poolOptions: {
threads: {
singleThread: false,
},
},
// Exclude heavy native/stellar modules from Vite's bundler so they are
// loaded as-is from node_modules — cuts peak heap usage during test
// collection and prevents OOM crashes on the worker subprocess.
server: {
deps: {
external: [
/node_modules\/@stellar\/stellar-sdk/,
/node_modules\/stellar-sdk/,
/node_modules\/@stellar\/stellar-base/,
/node_modules\/ws/,
/node_modules\/@aws-sdk/,
/node_modules\/prisma/,
/node_modules\/@prisma/,
],
},
},
coverage: {
provider: 'v8',
include: ['src/**/*.ts'],
exclude: [
'src/types/**',
'src/**/*.d.ts',
'src/**/*.test.ts',
'src/**/__mocks__/**',
'src/index.ts',
'src/db.ts',
'src/config.ts',
'src/reputation/**',
'src/sdk/**',
'src/tip/**',
'src/webhooks/**',
'src/ws/**',
'src/bridge-tracker/**',
'src/services/abuse-detection.ts',
'src/services/stripe-billing.ts',
],
reporter: ['text', 'text-summary', 'lcov', 'html', 'json-summary'],
reportsDirectory: './coverage',
thresholds: {
statements: 20,
branches: 15,
functions: 18,
lines: 20,
},
},
},
});