test: count cli command calls

This commit is contained in:
Shakker
2026-05-12 05:13:25 +01:00
parent 78fd1f18c5
commit e35bc01ade
4 changed files with 4 additions and 4 deletions

View File

@@ -211,7 +211,7 @@ describe("daemon-cli coverage", () => {
"ws://127.0.0.1:18789",
);
expect(findExtraGatewayServices).not.toHaveBeenCalled();
expect(inspectPortUsage).toHaveBeenCalled();
expect(inspectPortUsage).toHaveBeenCalledTimes(1);
});
it("derives probe URL from service args + env (json)", async () => {

View File

@@ -304,7 +304,7 @@ describe("runDaemonRestart health checks", () => {
await runDaemonRestart({ json: true, force: true });
expect(callGatewayCli).not.toHaveBeenCalled();
expect(runServiceRestart).toHaveBeenCalled();
expect(runServiceRestart).toHaveBeenCalledTimes(1);
});
it("forwards --safe --skip-deferral as skipDeferral: true on the RPC", async () => {

View File

@@ -93,7 +93,7 @@ describe("gateway --force helpers", () => {
const killed = forceFreePort(18789);
expect(execFileSync).toHaveBeenCalled();
expect(execFileSync).toHaveBeenCalledTimes(1);
expect(killMock).toHaveBeenCalledTimes(2);
expect(killMock).toHaveBeenCalledWith(42, "SIGTERM");
expect(killMock).toHaveBeenCalledWith(99, "SIGTERM");

View File

@@ -274,7 +274,7 @@ describe("runMessageAction", () => {
scope: "configured-channels",
onlyChannelIds: ["telegram"],
});
expect(messageCommandMock).toHaveBeenCalled();
expect(messageCommandMock).toHaveBeenCalledTimes(1);
});
it("loads configured channel plugins for mixed broadcast target prefixes", async () => {