chore: Remove debug code from session lifecycle tests

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 <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-10-12 21:02:35 +02:00
parent b67d6ba353
commit 66cb66b31b

View File

@@ -384,17 +384,6 @@ describe('Session Lifecycle Events & Retry Policy Integration Tests', () => {
// Give events time to fire // Give events time to fire
await new Promise(resolve => setTimeout(resolve, 100)); 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) // Should have succeeded (not 500 error)
expect(mockRes.status).not.toHaveBeenCalledWith(500); expect(mockRes.status).not.toHaveBeenCalledWith(500);