From 3eaefda8245ba0e69e0f2eeab0a01e112e56faf5 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 12 May 2026 22:57:53 +0100 Subject: [PATCH] test: dedupe runtime llm mock reads --- src/plugins/runtime/runtime-llm.runtime.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/runtime/runtime-llm.runtime.test.ts b/src/plugins/runtime/runtime-llm.runtime.test.ts index 3fe2ceddddb..d9f8afc573f 100644 --- a/src/plugins/runtime/runtime-llm.runtime.test.ts +++ b/src/plugins/runtime/runtime-llm.runtime.test.ts @@ -88,7 +88,7 @@ function expectSingleCallFirstArg( label = "mock first argument", ): Record { expect(mock.mock.calls).toHaveLength(1); - const [firstArg] = mock.mock.calls.at(0) ?? []; + const [firstArg] = mock.mock.calls[0] ?? []; const record = requireRecord(firstArg, label); expectFields(record, expected); return record; @@ -100,7 +100,7 @@ function expectSingleLogPayload( expected: Record, ): Record { expect(loggerMethod.mock.calls).toHaveLength(1); - const [actualMessage, payload] = loggerMethod.mock.calls.at(0) ?? []; + const [actualMessage, payload] = loggerMethod.mock.calls[0] ?? []; expect(actualMessage).toBe(message); const payloadRecord = requireRecord(payload, "log payload"); expectFields(payloadRecord, expected);