From 67e40485cd87a3d5ca32097980ea883b5d207349 Mon Sep 17 00:00:00 2001 From: Shakker Date: Fri, 8 May 2026 19:21:18 +0100 Subject: [PATCH] test: tighten debug view command assertion --- ui/src/ui/views/debug.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/ui/views/debug.test.ts b/ui/src/ui/views/debug.test.ts index eeaf9599da8..af731c661cd 100644 --- a/ui/src/ui/views/debug.test.ts +++ b/ui/src/ui/views/debug.test.ts @@ -58,7 +58,11 @@ describe("renderDebug", () => { ); const command = container.querySelector(".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("安全审计"); }); });