mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-19 16:28:28 +00:00
test(core): fix async timer handling in GeminiChat tests
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
282a3b43a0
commit
81caadcf3a
1 changed files with 1 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ describe('GeminiChat', async () => {
|
|||
/* consume */
|
||||
}
|
||||
})();
|
||||
// Register rejection handler BEFORE advancing timers to avoid unhandled rejection.
|
||||
// Get assertion promise first (don't await), then advance timers to avoid deadlock.
|
||||
const resultPromise =
|
||||
await expect(collecting).rejects.toThrow(InvalidStreamError);
|
||||
await vi.advanceTimersByTimeAsync(35_000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue