This commit is contained in:
Oleg Maslov
2026-09-02 10:14:22 +02:00
parent 0c3e2ead3b
commit b20b138fe4
771 changed files with 161561 additions and 9027 deletions

View File

@@ -26,12 +26,18 @@ describe('codex session-start handler', () => {
expect(bridge.recallMemory).toHaveBeenCalledWith('', { limit: 1, scope: 'personal', workspace: null });
expect(cap.stdout).toHaveLength(1);
const parsed = JSON.parse(cap.stdout[0]) as {
hookSpecificOutput: { source: string; additionalContext: string };
hookSpecificOutput: { hookEventName: string; additionalContext: string };
};
// Codex has no custom formatInject ⇒ the default CC hookSpecificOutput shape,
// stamped with source 'codex'.
expect(parsed.hookSpecificOutput.source).toBe('codex');
expect(parsed.hookSpecificOutput.additionalContext).toContain('past observation');
expect(parsed).toEqual({
hookSpecificOutput: {
hookEventName: 'SessionStart',
additionalContext: expect.stringContaining('past observation'),
},
});
expect(Object.keys(parsed.hookSpecificOutput).sort()).toEqual([
'additionalContext',
'hookEventName',
]);
expect(cap.exits).toEqual([0]);
});