mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-09-14 20:16:53 +08:00
c51ba91bb6
- Add teardownTimeout (3s) to vitest config for forced cleanup - Add global teardown function to vitest.setup.ts - Call child.unref() to prevent child processes from blocking event loop - Explicitly destroy stdio streams on process close/error
27 lines
613 B
TypeScript
27 lines
613 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
globalSetup: './vitest.setup.ts',
|
|
// Keep default pool settings; some tests rely on process.chdir,
|
|
// which is not supported in worker threads
|
|
include: ['test/**/*.test.ts'],
|
|
coverage: {
|
|
reporter: ['text', 'json', 'html'],
|
|
exclude: [
|
|
'node_modules/',
|
|
'dist/',
|
|
'bin/',
|
|
'*.config.ts',
|
|
'build.js',
|
|
'test/**'
|
|
]
|
|
},
|
|
testTimeout: 10000,
|
|
hookTimeout: 10000,
|
|
teardownTimeout: 3000
|
|
}
|
|
});
|