mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 23:40:45 +00:00
17 lines
692 B
TypeScript
17 lines
692 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { theme } from "../../terminal/theme.js";
|
|
import { resolveRuntimeStatusColor } from "./shared.js";
|
|
|
|
describe("resolveRuntimeStatusColor", () => {
|
|
it("maps known runtime states to expected theme colors", () => {
|
|
expect(resolveRuntimeStatusColor("running")).toBe(theme.success);
|
|
expect(resolveRuntimeStatusColor("stopped")).toBe(theme.error);
|
|
expect(resolveRuntimeStatusColor("unknown")).toBe(theme.muted);
|
|
});
|
|
|
|
it("falls back to warning color for unexpected states", () => {
|
|
expect(resolveRuntimeStatusColor("degraded")).toBe(theme.warn);
|
|
expect(resolveRuntimeStatusColor(undefined)).toBe(theme.muted);
|
|
});
|
|
});
|