-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.live.ts
More file actions
69 lines (64 loc) · 1.56 KB
/
vitest.config.live.ts
File metadata and controls
69 lines (64 loc) · 1.56 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
64
65
66
67
68
69
// 🧪 Vitest Configuration for Live Components Tests
import { defineConfig } from 'vitest/config'
import tsconfigPaths from 'vite-tsconfig-paths'
export default defineConfig({
plugins: [
tsconfigPaths() // ✅ Reads aliases from tsconfig.json automatically
],
test: {
name: 'live-components',
root: './core/server/live',
environment: 'node',
setupFiles: ['./__tests__/setup.ts'],
include: [
'**/__tests__/**/*.test.ts'
],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/.{idea,git,cache,output,temp}/**'
],
globals: true,
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
reportsDirectory: './coverage/live-components',
include: [
'core/server/live/**/*.ts'
],
exclude: [
'core/server/live/**/__tests__/**',
'core/server/live/**/*.test.ts',
'core/server/live/**/*.spec.ts'
],
thresholds: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
}
},
testTimeout: 10000,
hookTimeout: 10000,
teardownTimeout: 5000,
isolate: true,
pool: 'threads',
poolOptions: {
threads: {
singleThread: false,
minThreads: 1,
maxThreads: 4
}
},
reporters: ['verbose', 'json'],
outputFile: {
json: './test-results/live-components.json'
}
},
// ℹ️ resolve.alias removed: Automatically read from tsconfig.json via tsconfigPaths plugin
esbuild: {
target: 'node18'
}
})