-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathvitest.server.config.ts
More file actions
54 lines (51 loc) · 1.47 KB
/
vitest.server.config.ts
File metadata and controls
54 lines (51 loc) · 1.47 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
// Vitest inherits NODE_ENV from the parent process. Override when running
// inside a production Freshell server.
if (process.env.NODE_ENV === 'production') {
process.env.NODE_ENV = 'test'
}
import { defineConfig } from 'vitest/config'
import path from 'path'
import { fileURLToPath } from 'url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@test': path.resolve(__dirname, './test'),
'@shared': path.resolve(__dirname, './shared'),
},
},
test: {
environment: 'node',
globalSetup: ['./test/setup/server-global-setup.ts'],
include: [
'test/server/**/*.test.ts',
'test/unit/server/**/*.test.ts',
'test/unit/visible-first/**/*.test.ts',
'test/integration/server/**/*.test.ts',
'test/integration/session-repair.test.ts',
'test/integration/session-search-e2e.test.ts',
'test/integration/extension-system.test.ts',
],
exclude: [
'docs/plans/**',
'test/unit/visible-first/slow-network-controller.test.ts',
],
testTimeout: 30000,
hookTimeout: 30000,
// Maximum parallelization settings
pool: 'threads',
poolOptions: {
threads: {
singleThread: false,
isolate: true,
},
},
fileParallelism: true,
maxConcurrency: 10,
sequence: {
shuffle: true, // Detect order-dependent tests
},
},
})