test(cli): reduce update/program suite overhead

This commit is contained in:
Peter Steinberger
2026-03-02 09:45:47 +00:00
parent 500883775b
commit fcb956a0a2
3 changed files with 48 additions and 113 deletions

View File

@@ -4,7 +4,6 @@ import {
ensureConfigReady,
installBaseProgramMocks,
installSmokeProgramMocks,
messageCommand,
onboardCommand,
runTui,
runtime,
@@ -42,16 +41,10 @@ describe("cli program (smoke)", () => {
ensureConfigReady.mockResolvedValue(undefined);
});
it("runs message command with required options", async () => {
await expect(
runProgram(["message", "send", "--target", "+1", "--message", "hi"]),
).rejects.toThrow("exit");
expect(messageCommand).toHaveBeenCalled();
});
it("registers memory + status commands", () => {
const program = createProgram();
const names = program.commands.map((command) => command.name());
expect(names).toContain("message");
expect(names).toContain("memory");
expect(names).toContain("status");
});