27 lines
952 B
JavaScript
27 lines
952 B
JavaScript
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import test from "node:test";
|
|
|
|
const source = readFileSync(new URL("./render-voidbot-swarm-dashboard.mjs", import.meta.url), "utf8");
|
|
|
|
test("the operator surface is composed from metrics and typed lists", () => {
|
|
for (const componentId of [
|
|
"voidbot-status-metrics",
|
|
"live-queue-items",
|
|
"metric-route-provider",
|
|
"route-alerts",
|
|
"metric-swarm-brake",
|
|
]) assert.match(source, new RegExp(`\\b${componentId}\\b`));
|
|
|
|
assert.match(source, /sourceId: "voidbot\.swarm_operator_view:voidbot-swarm"/);
|
|
assert.match(source, /schemaId: "voidbot\.swarm_operator_view\.v1"/);
|
|
});
|
|
|
|
test("the migrated prose authorities cannot reappear in the surface", () => {
|
|
for (const removedId of [
|
|
"voidbot-status-line",
|
|
"route-summary",
|
|
"swarm-pause-status",
|
|
"live-queue-empty",
|
|
]) assert.doesNotMatch(source, new RegExp(`\\b${removedId}\\b`));
|
|
});
|