From a282bdc6013545d13ef027a9cf5f2ba290f2a967 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 13 May 2026 06:25:08 +0100 Subject: [PATCH] test: dedupe openai image mock reads --- extensions/openai/image-generation-provider.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/openai/image-generation-provider.test.ts b/extensions/openai/image-generation-provider.test.ts index bacdb195adf..bfcbc4199e6 100644 --- a/extensions/openai/image-generation-provider.test.ts +++ b/extensions/openai/image-generation-provider.test.ts @@ -1163,7 +1163,7 @@ describe("openai image generation provider", () => { ], }); - const body = postJsonRequestMock.mock.calls.at(0)?.[0].body as { + const body = postJsonRequestMock.mock.calls[0]?.[0].body as { input: Array<{ content: Array> }>; }; expect(body.input[0]?.content).toEqual([ @@ -1192,7 +1192,7 @@ describe("openai image generation provider", () => { }); expect(postJsonRequestMock).toHaveBeenCalledTimes(2); - const firstBody = postJsonRequestMock.mock.calls.at(0)?.[0].body as { + const firstBody = postJsonRequestMock.mock.calls[0]?.[0].body as { tools: Array>; }; expect(firstBody.tools[0]).toEqual({