test: clarify browser client endpoint assertions · openclaw/openclaw@3e53b19
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
File tree
extensions/browser/src/browser
| Original file line number | Diff line number | Diff line change |
|---|
@@ -316,9 +316,13 @@ describe("browser client", () => {
|
316 | 316 | browserScreenshotAction("http://127.0.0.1:18791", { targetId: "t-default" }), |
317 | 317 | ).resolves.toMatchObject({ ok: true, path: "/tmp/a.png" }); |
318 | 318 | |
319 | | -expect(calls.some((c) => c.url.endsWith("/tabs"))).toBe(true); |
320 | | -expect(calls.some((c) => c.url.endsWith("/doctor"))).toBe(true); |
321 | | -expect(calls.some((c) => c.url.endsWith("/doctor?profile=openclaw&deep=true"))).toBe(true); |
| 319 | +expect(calls.map((call) => call.url)).toEqual( |
| 320 | +expect.arrayContaining([ |
| 321 | +expect.stringMatching(/\/tabs$/), |
| 322 | +expect.stringMatching(/\/doctor$/), |
| 323 | +expect.stringMatching(/\/doctor\?profile=openclaw&deep=true$/), |
| 324 | +]), |
| 325 | +); |
322 | 326 | const open = calls.find((c) => c.url.endsWith("/tabs/open")); |
323 | 327 | expect(open?.init?.method).toBe("POST"); |
324 | 328 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。