takt/vitest.config.ts
nrslib ee0cb8e13a E2Eテスト基盤の追加・レビューエージェント改善・lint修正
- E2Eテストのフィクスチャ、ヘルパー、スペックを追加
- mock/provider別のvitest設定を追加
- レビューエージェントのプロンプト改善
- TTY判定の共通化、list/confirmのnon-interactive対応
- eslint no-non-null-assertion を off に変更、未使用インポート削除
2026-02-05 16:59:32 +09:00

28 lines
754 B
TypeScript

import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
include: ['src/__tests__/**/*.test.ts'],
environment: 'node',
globals: false,
setupFiles: ['src/__tests__/test-setup.ts'],
// Ensure proper cleanup by forcing sequential execution and graceful shutdown
pool: 'threads',
poolOptions: {
threads: {
singleThread: true,
},
},
// Increase timeout for tests with async cleanup
testTimeout: 15000,
// Force exit after tests complete to prevent hanging
teardownTimeout: 5000,
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
include: ['src/**/*.ts'],
exclude: ['src/__tests__/**', 'src/**/*.d.ts'],
},
},
});