test: dedupe openai image mock reads

This commit is contained in:
Peter Steinberger
2026-05-13 06:25:08 +01:00
parent 7bb2153fb2
commit a282bdc601

View File

@@ -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<Record<string, string>> }>;
};
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<Record<string, unknown>>;
};
expect(firstBody.tools[0]).toEqual({