fix(cli): daemon output + health colors
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user