test: guard daemon cli mock calls

This commit is contained in:
Peter Steinberger
2026-05-12 08:07:30 +01:00
parent af632f4d9e
commit 81d973e09d

View File

@@ -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 () => {