mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
Remove unneeded mockRestore()s from tests (#919)
This commit is contained in:
parent
3372fd8df8
commit
fb6e2927f7
6 changed files with 5 additions and 28 deletions
|
|
@ -35,6 +35,7 @@ describe('runNonInteractive', () => {
|
|||
let mockProcessExit: ReturnType<typeof vi.fn>;
|
||||
|
||||
beforeEach(() => {
|
||||
vi.resetAllMocks();
|
||||
mockChat = {
|
||||
sendMessageStream: vi.fn(),
|
||||
};
|
||||
|
|
@ -201,7 +202,6 @@ describe('runNonInteractive', () => {
|
|||
expect(mockProcessStdoutWrite).toHaveBeenCalledWith(
|
||||
'Could not complete request.',
|
||||
);
|
||||
consoleErrorSpy.mockRestore();
|
||||
});
|
||||
|
||||
it('should exit with error if sendMessageStream throws initially', async () => {
|
||||
|
|
@ -217,6 +217,5 @@ describe('runNonInteractive', () => {
|
|||
'Error processing input:',
|
||||
apiError,
|
||||
);
|
||||
consoleErrorSpy.mockRestore();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue