repro: improve telemetry assertion to check stdout/stderr

This commit is contained in:
Taylor Mullen
2026-02-10 17:09:30 -08:00
parent 5b371082e3
commit 2c300fb378
+5 -2
View File
@@ -153,10 +153,13 @@ describe('Hooks System Integration', () => {
const blockHook = hookLogs.find(
(log) =>
log.hookCall.hook_event_name === 'BeforeTool' &&
log.hookCall.exit_code === 2,
(log.hookCall.stdout.includes('"decision":"deny"') ||
log.hookCall.stderr.includes('"decision":"deny"')),
);
expect(blockHook).toBeDefined();
expect(blockHook?.hookCall.stderr).toContain(blockMsg);
expect(
blockHook?.hookCall.stdout + blockHook?.hookCall.stderr,
).toContain(blockMsg);
});
it('should allow tool execution when hook returns allow decision', async () => {