Commit 617c9d4
fix: isolate async model resolution mock from sync mock in test (#93714)
The 'can preserve asynchronous provider model discovery' test was
flaky because resolveModelAsyncMock in beforeEach delegates to
resolveModelMock. When useAsyncModelResolution=true, the test
asserted resolveModelMock was not called, but the delegation
caused it to be called, failing CI on two lanes.
Fix: use a standalone vi.fn() for the async resolver in this
test, and explicitly reset resolveModelMock before the assertion
to guard against mock state leakage from prior tests.
Fixes #92117
Co-authored-by: lsr911 <[email protected]>1 parent 76658cd commit 617c9d4
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
480 | 484 | | |
481 | 485 | | |
482 | 486 | | |
| |||
486 | 490 | | |
487 | 491 | | |
488 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
489 | 496 | | |
490 | 497 | | |
491 | 498 | | |
492 | 499 | | |
493 | 500 | | |
494 | 501 | | |
495 | | - | |
| 502 | + | |
496 | 503 | | |
497 | 504 | | |
498 | 505 | | |
499 | 506 | | |
500 | | - | |
| 507 | + | |
501 | 508 | | |
502 | 509 | | |
503 | 510 | | |
| |||
0 commit comments