test: tighten debug view command assertion

This commit is contained in:
Shakker
2026-05-08 19:21:18 +01:00
parent 16c54655d3
commit 67e40485cd

View File

@@ -58,7 +58,11 @@ describe("renderDebug", () => {
);
const command = container.querySelector<HTMLElement>(".callout .mono");
expect(command?.textContent).toBe("openclaw security audit --deep");
expect(command).toBeTruthy();
if (!command) {
throw new Error("expected debug security audit command");
}
expect(command.textContent).toBe("openclaw security audit --deep");
expect(container.textContent).toContain("安全审计");
});
});