[grade=pending] QA sprint: commit 103 at-risk files from multi-agent sprint work

Committed by Hermes autonomous QA sprint 2026-08-13.
These files were modified during the Aug 12 sprint but never committed.
This commit is contained in:
Krystie
2026-08-12 17:34:10 -07:00
parent 0bf4406253
commit 503de258b8
105 changed files with 14057 additions and 2632 deletions
+11 -10
View File
@@ -156,18 +156,19 @@ describe('Error Handler', () => {
});
it('logs non-operational errors as FATAL', () => {
const origError = console.error;
console.error = jest.fn();
const stderrSpy = jest.spyOn(process.stderr, 'write').mockImplementation(() => true);
const err = new Error('programming bug');
errorMiddleware(err, req, res, next);
try {
const err = new Error('programming bug');
errorMiddleware(err, req, res, next);
expect(console.error).toHaveBeenCalledWith(
'FATAL: Non-operational error detected',
expect.any(Object)
);
console.error = origError;
const calls = stderrSpy.mock.calls.map(c => String(c[0]));
const fatalLine = calls.find(l => l.includes('FATAL'));
expect(fatalLine).toBeDefined();
expect(fatalLine).toContain('programming bug');
} finally {
stderrSpy.mockRestore();
}
});
});