mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 21:03:08 +00:00
test: update claude-provider test to match new error logging format
This commit is contained in:
@@ -247,19 +247,15 @@ describe('claude-provider.ts', () => {
|
|||||||
|
|
||||||
await expect(collectAsyncGenerator(generator)).rejects.toThrow('SDK execution failed');
|
await expect(collectAsyncGenerator(generator)).rejects.toThrow('SDK execution failed');
|
||||||
|
|
||||||
// Should log error message
|
// Should log error with classification info (after refactoring)
|
||||||
expect(consoleErrorSpy).toHaveBeenNthCalledWith(
|
const errorCall = consoleErrorSpy.mock.calls[0];
|
||||||
1,
|
expect(errorCall[0]).toBe('[ClaudeProvider] executeQuery() error during execution:');
|
||||||
'[ClaudeProvider] ERROR: executeQuery() error during execution:',
|
expect(errorCall[1]).toMatchObject({
|
||||||
testError
|
type: expect.any(String),
|
||||||
);
|
message: 'SDK execution failed',
|
||||||
|
isRateLimit: false,
|
||||||
// Should log stack trace
|
stack: expect.stringContaining('Error: SDK execution failed'),
|
||||||
expect(consoleErrorSpy).toHaveBeenNthCalledWith(
|
});
|
||||||
2,
|
|
||||||
'[ClaudeProvider] ERROR stack:',
|
|
||||||
testError.stack
|
|
||||||
);
|
|
||||||
|
|
||||||
consoleErrorSpy.mockRestore();
|
consoleErrorSpy.mockRestore();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user