import { describe, expect, it } from "vitest" ;
import {
buildStatusAllOverviewRows,
buildStatusCommandOverviewRows,
} from "./status-overview-rows.ts" ;
import {
baseStatusOverviewSurface,
createStatusCommandOverviewRowsParams,
} from "./status.test-support.ts" ;
describe("status-overview-rows" , () => {
it("builds command overview rows from the shared surface" , () => {
expect(buildStatusCommandOverviewRows(createStatusCommandOverviewRowsParams())).toEqual(
expect.arrayContaining([
{ Item: "OS" , Value: `macOS · node ${process.versions.node}` },
{
Item: "Memory" ,
Value:
"1 files · 2 chunks · plugin memory · ok(vector ready) · warn(fts ready) · muted(cache warm)" ,
},
{ Item: "Plugin compatibility" , Value: "warn(1 notice · 1 plugin)" },
{ Item: "Sessions" , Value: "2 active · default gpt-5.5 (12k ctx) · store.json" },
]),
);
});
it("builds status-all overview rows from the shared surface" , () => {
expect(
buildStatusAllOverviewRows({
surface: {
...baseStatusOverviewSurface,
tailscaleMode: "off" ,
tailscaleHttpsUrl: null ,
gatewayConnection: { url: "wss://gateway.example.com", urlSource: "config" },
},
osLabel: "macOS" ,
configPath: "/tmp/openclaw.json" ,
secretDiagnosticsCount: 2 ,
agentStatus: {
bootstrapPendingCount: 1 ,
totalSessions: 2 ,
agents: [{ id: "main" , lastActiveAgeMs: 60 _000 }],
},
tailscaleBackendState: "Running" ,
}),
).toEqual(
expect.arrayContaining([
{ Item: "Version" , Value: expect.any(String) },
{ Item: "OS" , Value: "macOS" },
{ Item: "Config" , Value: "/tmp/openclaw.json" },
{ Item: "Security" , Value: "Run: openclaw security audit --deep" },
{ Item: "Secrets" , Value: "2 diagnostics" },
]),
);
});
});
Messung V0.5 in Prozent C=99 H=100 G=99
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-10)
¤
*© Formatika GbR, Deutschland