mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: dedupe tavily client mock reads
This commit is contained in:
@@ -45,7 +45,7 @@ describe("tavily client X-Client-Source header", () => {
|
|||||||
await runTavilySearch({ query: "test query" });
|
await runTavilySearch({ query: "test query" });
|
||||||
|
|
||||||
expect(postTrustedWebToolsJson).toHaveBeenCalledOnce();
|
expect(postTrustedWebToolsJson).toHaveBeenCalledOnce();
|
||||||
const params = postTrustedWebToolsJson.mock.calls.at(0)?.[0];
|
const params = postTrustedWebToolsJson.mock.calls[0]?.[0];
|
||||||
expect(params.extraHeaders).toEqual({ "X-Client-Source": "openclaw" });
|
expect(params.extraHeaders).toEqual({ "X-Client-Source": "openclaw" });
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ describe("tavily client X-Client-Source header", () => {
|
|||||||
await runTavilyExtract({ urls: ["https://example.com"] });
|
await runTavilyExtract({ urls: ["https://example.com"] });
|
||||||
|
|
||||||
expect(postTrustedWebToolsJson).toHaveBeenCalledOnce();
|
expect(postTrustedWebToolsJson).toHaveBeenCalledOnce();
|
||||||
const params = postTrustedWebToolsJson.mock.calls.at(0)?.[0];
|
const params = postTrustedWebToolsJson.mock.calls[0]?.[0];
|
||||||
expect(params.extraHeaders).toEqual({ "X-Client-Source": "openclaw" });
|
expect(params.extraHeaders).toEqual({ "X-Client-Source": "openclaw" });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user