test(docs): avoid URL default stringification · openclaw/openclaw@61fa2b2
steipete
·
2026-05-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -53,7 +53,8 @@ describe("docsSearchCommand", () => {
|
53 | 53 | |
54 | 54 | expect(fetchMock).toHaveBeenCalledTimes(1); |
55 | 55 | const [url, init] = fetchMock.mock.calls[0]; |
56 | | -expect(String(url)).toBe("https://docs.openclaw.ai/api/search?q=plugin+allowlist"); |
| 56 | +expect(url).toBeInstanceOf(URL); |
| 57 | +expect(url.href).toBe("https://docs.openclaw.ai/api/search?q=plugin+allowlist"); |
57 | 58 | expect(init).toMatchObject({ headers: { Accept: "application/json" } }); |
58 | 59 | }); |
59 | 60 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。