fix(cli): daemon output + health colors
This commit is contained in:
1 parent
2bae4d2dba
commit
f1ac18933c
6 files changed
+58
-3
No files matched your search
@@ -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