diff --git a/src/agents/model-fallback.run-embedded.e2e.test.ts b/src/agents/model-fallback.run-embedded.e2e.test.ts index da6111a16d3..2c1fe0284cd 100644 --- a/src/agents/model-fallback.run-embedded.e2e.test.ts +++ b/src/agents/model-fallback.run-embedded.e2e.test.ts @@ -328,12 +328,10 @@ function mockPrimaryRunLoopRateLimitThenFallbackSuccess(errorMessage: string) { function expectOpenAiThenGroqAttemptOrder(params?: { expectOpenAiAuthProfileId?: string }) { expect(runEmbeddedAttemptMock).toHaveBeenCalledTimes(2); - const firstCall = runEmbeddedAttemptMock.mock.calls.at(0)?.[0] as + const firstCall = runEmbeddedAttemptMock.mock.calls[0]?.[0] as | { provider?: string; authProfileId?: string } | undefined; - const secondCall = runEmbeddedAttemptMock.mock.calls.at(1)?.[0] as - | { provider?: string } - | undefined; + const secondCall = runEmbeddedAttemptMock.mock.calls[1]?.[0] as { provider?: string } | undefined; if (!firstCall || !secondCall) { throw new Error("expected primary and fallback embedded run attempts"); } @@ -704,7 +702,7 @@ describe("runWithModelFallback + runEmbeddedPiAgent failover behavior", () => { expect((thrown as Error).message).toBe("Operation aborted"); expect(runEmbeddedAttemptMock).toHaveBeenCalledTimes(1); - const firstCall = runEmbeddedAttemptMock.mock.calls.at(0)?.[0] as + const firstCall = runEmbeddedAttemptMock.mock.calls[0]?.[0] as | { provider?: string } | undefined; expect(firstCall?.provider).toBe("openai");