takt/src/__tests__/engine-test-helpers.test.ts
nrs 194610018a
takt/#209/update review history logs (#213)
* fix: callAiJudgeをプロバイダーシステム経由に変更(Codex対応)

callAiJudgeがinfra/claude/にハードコードされており、Codexプロバイダー使用時に
judge評価が動作しなかった。agents/ai-judge.tsに移動し、runAgent経由で
プロバイダーを正しく解決するように修正。

* takt: github-issue-209
2026-02-10 19:58:38 +09:00

22 lines
781 B
TypeScript

import { describe, it, expect, vi } from 'vitest';
import { cleanupPieceEngine } from './engine-test-helpers.js';
describe('cleanupPieceEngine', () => {
it('should remove all listeners when engine has removeAllListeners function', () => {
const removeAllListeners = vi.fn();
const engine = { removeAllListeners };
cleanupPieceEngine(engine);
expect(removeAllListeners).toHaveBeenCalledOnce();
});
it('should not throw when engine does not have removeAllListeners function', () => {
expect(() => cleanupPieceEngine({})).not.toThrow();
expect(() => cleanupPieceEngine(null)).not.toThrow();
expect(() => cleanupPieceEngine(undefined)).not.toThrow();
expect(() => cleanupPieceEngine({ removeAllListeners: 'no-op' })).not.toThrow();
});
});