fix(cli): daemon output + health colors

This commit is contained in:
Peter Steinberger
2026-01-15 08:28:33 +00:00
parent 2bae4d2dba
commit f1ac18933c
6 changed files with 58 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
import type { HealthSummary } from "./health.js";
import { healthCommand } from "./health.js";
import { stripAnsi } from "../terminal/ansi.js";
const callGatewayMock = vi.fn();
const logWebSelfIdMock = vi.fn();
@@ -70,7 +71,9 @@ describe("healthCommand (coverage)", () => {
await healthCommand({ json: false, timeoutMs: 1000 }, runtime as never);
expect(runtime.exit).not.toHaveBeenCalled();
expect(runtime.log.mock.calls.map((c) => String(c[0])).join("\n")).toMatch(/WhatsApp: linked/i);
expect(stripAnsi(runtime.log.mock.calls.map((c) => String(c[0])).join("\n"))).toMatch(
/WhatsApp: linked/i,
);
expect(logWebSelfIdMock).toHaveBeenCalled();
});
});