* fix: callAiJudgeをプロバイダーシステム経由に変更(Codex対応) callAiJudgeがinfra/claude/にハードコードされており、Codexプロバイダー使用時に judge評価が動作しなかった。agents/ai-judge.tsに移動し、runAgent経由で プロバイダーを正しく解決するように修正。 * takt: github-issue-209
22 lines
781 B
TypeScript
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();
|
|
});
|
|
});
|