test: tighten debug view command assertion · openclaw/openclaw@67e4048
shakkernerd
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -58,7 +58,11 @@ describe("renderDebug", () => {
|
58 | 58 | ); |
59 | 59 | |
60 | 60 | const command = container.querySelector<HTMLElement>(".callout .mono"); |
61 | | -expect(command?.textContent).toBe("openclaw security audit --deep"); |
| 61 | +expect(command).toBeTruthy(); |
| 62 | +if (!command) { |
| 63 | +throw new Error("expected debug security audit command"); |
| 64 | +} |
| 65 | +expect(command.textContent).toBe("openclaw security audit --deep"); |
62 | 66 | expect(container.textContent).toContain("安全审计"); |
63 | 67 | }); |
64 | 68 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。