mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 05:55:17 -07:00
This commit is contained in:
@@ -1043,10 +1043,13 @@ describe('mcp-client', () => {
|
||||
if (options?.signal?.aborted) {
|
||||
return reject(new Error('Operation aborted'));
|
||||
}
|
||||
options?.signal?.addEventListener('abort', () => {
|
||||
reject(new Error('Operation aborted'));
|
||||
});
|
||||
// Intentionally do not resolve immediately to simulate lag
|
||||
options?.signal?.addEventListener(
|
||||
'abort',
|
||||
() => {
|
||||
reject(new Error('Operation aborted'));
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
}),
|
||||
),
|
||||
listPrompts: vi.fn().mockResolvedValue({ prompts: [] }),
|
||||
|
||||
@@ -242,7 +242,7 @@ export abstract class BaseToolInvocation<
|
||||
}
|
||||
};
|
||||
|
||||
abortSignal.addEventListener('abort', abortHandler);
|
||||
abortSignal.addEventListener('abort', abortHandler, { once: true });
|
||||
|
||||
timeoutId = setTimeout(() => {
|
||||
cleanup();
|
||||
|
||||
Reference in New Issue
Block a user