diff --git a/src/memory/embeddings.test.ts b/src/memory/embeddings.test.ts index 51bb7bf764a..3949fb0b05f 100644 --- a/src/memory/embeddings.test.ts +++ b/src/memory/embeddings.test.ts @@ -245,7 +245,8 @@ describe("embedding provider remote overrides", () => { await provider.embedQuery("hello"); const { init } = readFirstFetchRequest(fetchMock); - expect(init?.body ? JSON.parse(String(init.body)) : {}).toMatchObject({ + const requestBody = typeof init?.body === "string" ? JSON.parse(init.body) : {}; + expect(requestBody).toMatchObject({ outputDimensionality: 768, }); });