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