diff --git a/src/cli/daemon-cli.coverage.test.ts b/src/cli/daemon-cli.coverage.test.ts index 5b3ef98a216..40477102519 100644 --- a/src/cli/daemon-cli.coverage.test.ts +++ b/src/cli/daemon-cli.coverage.test.ts @@ -256,10 +256,11 @@ describe("daemon-cli coverage", () => { await runDaemonCommand(["daemon", "status", "--deep"]); expect(findExtraGatewayServices).toHaveBeenCalledTimes(1); - if (findExtraGatewayServices.mock.calls[0]?.[0] === undefined) { + const discoveryCall = findExtraGatewayServices.mock.calls.at(0); + if (discoveryCall?.[0] === undefined) { throw new Error("Expected gateway service discovery params"); } - expect(findExtraGatewayServices.mock.calls[0]?.[1]).toEqual({ deep: true }); + expect(discoveryCall[1]).toEqual({ deep: true }); }); it("installs the daemon (json output)", async () => {