Skip to content

Commit f863447

Browse files
committed
test: guard cli route mock calls
1 parent 4f7ce2a commit f863447

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cli/route.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe("tryRouteCli", () => {
8888
await expect(tryRouteCli(["node", "openclaw", "status"])).resolves.toBe(true);
8989

9090
expect(ensureConfigReadyMock).toHaveBeenCalledTimes(1);
91-
const configReadyCall = ensureConfigReadyMock.mock.calls[0]?.[0] as
91+
const configReadyCall = ensureConfigReadyMock.mock.calls.at(0)?.[0] as
9292
| { runtime?: unknown; commandPath?: unknown }
9393
| undefined;
9494
expect(typeof configReadyCall?.runtime).toBe("object");
@@ -161,7 +161,7 @@ describe("tryRouteCli", () => {
161161
["node", "openclaw", "--log-level", "debug", "status"],
162162
);
163163
expect(ensureConfigReadyMock).toHaveBeenCalledTimes(1);
164-
const configReadyCall = ensureConfigReadyMock.mock.calls[0]?.[0] as
164+
const configReadyCall = ensureConfigReadyMock.mock.calls.at(0)?.[0] as
165165
| { runtime?: unknown; commandPath?: unknown }
166166
| undefined;
167167
expect(typeof configReadyCall?.runtime).toBe("object");

0 commit comments

Comments
 (0)