Skip to content

Commit 3e53b19

Browse files
committed
test: clarify browser client endpoint assertions
1 parent 5bdec91 commit 3e53b19

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

extensions/browser/src/browser/client.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,13 @@ describe("browser client", () => {
316316
browserScreenshotAction("http://127.0.0.1:18791", { targetId: "t-default" }),
317317
).resolves.toMatchObject({ ok: true, path: "/tmp/a.png" });
318318

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+
);
322326
const open = calls.find((c) => c.url.endsWith("/tabs/open"));
323327
expect(open?.init?.method).toBe("POST");
324328

0 commit comments

Comments
 (0)