-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.models.config.ts
More file actions
71 lines (70 loc) · 1.94 KB
/
Copy pathvitest.models.config.ts
File metadata and controls
71 lines (70 loc) · 1.94 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
70
71
/// <reference types="vitest" />
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
test: {
name: 'Model Tests',
environment: 'node',
setupFiles: ['./workstation/frontend/src/test/models-setup.ts'],
include: [
'**/__tests__/**/*.model.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
'**/models/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
'**/*.model.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
'**/workstation/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'
],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/cypress/**',
'**/.{idea,git,cache,output,temp}/**',
'**/build/**'
],
globals: true,
timeout: 120000, // Longer timeout for model operations
testTimeout: 120000,
hookTimeout: 60000,
pool: 'threads',
poolOptions: {
threads: {
singleThread: false,
maxThreads: 2, // Limit threads for model tests
minThreads: 1
}
},
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'coverage/**',
'dist/**',
'packages/*/test{,s}/**',
'**/*.d.ts',
'cypress/**',
'test{,s}/**',
'test{,-*}.{js,cjs,mjs,ts,tsx,jsx}',
'**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}',
'**/*{.,-}spec.{js,cjs,mjs,ts,tsx,jsx}',
'**/__tests__/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'**/.{eslint,mocha,prettier}rc.{js,cjs,yml}'
]
},
ui: true,
open: false,
reporter: ['verbose', 'html'],
outputFile: {
html: './test-results/models-report.html'
}
},
resolve: {
alias: {
'@orpheus': path.resolve(__dirname, './src'),
'@': path.resolve(__dirname, './src')
}
},
define: {
global: 'globalThis'
}
})