-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
34 lines (32 loc) · 961 Bytes
/
vitest.config.ts
File metadata and controls
34 lines (32 loc) · 961 Bytes
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
/// <reference types="vitest/config" />
import { defineConfig } from 'vitest/config'
import path from 'path'
const testDbPath = path.resolve(__dirname, 'data', 'test.db')
export default defineConfig({
test: {
// Vitest 4: sequential execution to avoid SQLite concurrency
sequence: {
concurrent: false,
},
fileParallelism: false,
testTimeout: 15000,
exclude: [
'**/node_modules/**',
'**/bfs-pathfinder.test.ts',
],
// Setup env vars cho test — dùng absolute path
env: {
DATA_MODE: 'local',
DATABASE_URL: `file:${testDbPath}`,
LOCAL_AUTH_DISABLED: 'true',
NEXT_PUBLIC_LOCAL_AUTH_DISABLED: 'true',
},
// Global setup/teardown
globalSetup: './tests/global-setup.ts',
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
})