mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-16 18:34:18 +00:00
test: guard daemon cli mock calls
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user