You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use vi.spyOn for proper mock isolation in ai-agent tests
Replace module-level nextGenerateResultOverride with vi.spyOn on MockToolLoopAgent.prototype.generate
to properly mock the method per-test. Each test now sets up its own spy with mockImplementation
to capture lastGenerateMessages while returning the mocked result.
This ensures proper test isolation and fixes the race condition in CI where module-level
state wasn't being properly captured between tests.
Signed-off-by: betterclever <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-019c1a9e-e1f3-755b-99e7-5a617c149f9e
Co-authored-by: Amp <[email protected]>
0 commit comments