takt/vitest.config.ts
nrslib 6a28929497 fix: 通知ユーティリティのテストモック追加と check:release の通知対応
通知機能(notifySuccess/notifyError/playWarningSound)追加に伴い、
テストの vi.mock を修正。重複モックの統合、vitest 環境変数の追加、
GH API の recursive パラメータ修正、check:release に macOS 通知を追加。
2026-02-23 14:34:20 +09:00

32 lines
830 B
TypeScript

import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
env: {
TAKT_CONFIG_DIR: '',
TAKT_NOTIFY_WEBHOOK: '',
},
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'],
},
},
});