From 66cb66b31b819ebe684b68854f176c1227a764f3 Mon Sep 17 00:00:00 2001 From: czlonkowski <56956555+czlonkowski@users.noreply.github.com> Date: Sun, 12 Oct 2025 21:02:35 +0200 Subject: [PATCH] chore: Remove debug code from session lifecycle tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed temporary debug logging code that was used during troubleshooting. The debug code was causing TypeScript lint errors by accessing mock internals that aren't properly typed. Changes: - Removed debug file write to /tmp/test-error-debug.json - Cleaned up lines 387-396 in session-lifecycle-retry.test.ts Tests: All 14 tests still passing Lint: Clean (no TypeScript errors) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tests/integration/session-lifecycle-retry.test.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/integration/session-lifecycle-retry.test.ts b/tests/integration/session-lifecycle-retry.test.ts index ca47a6f..a3bf8ff 100644 --- a/tests/integration/session-lifecycle-retry.test.ts +++ b/tests/integration/session-lifecycle-retry.test.ts @@ -384,17 +384,6 @@ describe('Session Lifecycle Events & Retry Policy Integration Tests', () => { // Give events time to fire await new Promise(resolve => setTimeout(resolve, 100)); - // Debug: Write error details to file for inspection - if (mockRes.status.mock.calls.length > 0 && mockRes.status.mock.calls[0][0] === 500) { - const fs = await import('fs'); - const errorDetails = { - statusCalls: mockRes.status.mock.calls, - jsonCalls: mockRes.json.mock.calls, - testName: 'should retry transient failures and eventually succeed' - }; - fs.writeFileSync('/tmp/test-error-debug.json', JSON.stringify(errorDetails, null, 2)); - } - // Should have succeeded (not 500 error) expect(mockRes.status).not.toHaveBeenCalledWith(500);