Files
fission-ai__openspec/vitest.setup.ts
Tabish Bidiwale c51ba91bb6 fix(test): prevent hanging vitest threads after test runs
- 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
2025-12-25 03:25:46 +11:00

13 lines
355 B
TypeScript

import { ensureCliBuilt } from './test/helpers/run-cli.js';
// Ensure the CLI bundle exists before tests execute
export async function setup() {
await ensureCliBuilt();
}
// Global teardown to ensure clean exit
export async function teardown() {
// Clear any remaining timers
// This helps prevent hanging handles from keeping the process alive
}