test: dedupe tavily client mock reads · openclaw/openclaw@4e1f926
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -45,15 +45,15 @@ describe("tavily client X-Client-Source header", () => {
|
45 | 45 | await runTavilySearch({ query: "test query" }); |
46 | 46 | |
47 | 47 | expect(postTrustedWebToolsJson).toHaveBeenCalledOnce(); |
48 | | -const params = postTrustedWebToolsJson.mock.calls.at(0)?.[0]; |
| 48 | +const params = postTrustedWebToolsJson.mock.calls[0]?.[0]; |
49 | 49 | expect(params.extraHeaders).toEqual({ "X-Client-Source": "openclaw" }); |
50 | 50 | }); |
51 | 51 | |
52 | 52 | it("runTavilyExtract sends X-Client-Source: openclaw", async () => { |
53 | 53 | await runTavilyExtract({ urls: ["https://example.com"] }); |
54 | 54 | |
55 | 55 | expect(postTrustedWebToolsJson).toHaveBeenCalledOnce(); |
56 | | -const params = postTrustedWebToolsJson.mock.calls.at(0)?.[0]; |
| 56 | +const params = postTrustedWebToolsJson.mock.calls[0]?.[0]; |
57 | 57 | expect(params.extraHeaders).toEqual({ "X-Client-Source": "openclaw" }); |
58 | 58 | }); |
59 | 59 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。