test: tighten config form element helper · openclaw/openclaw@497ec02
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -35,8 +35,8 @@ const rootSchema = {
|
35 | 35 | const rootAnalysis = analyzeConfigSchema(rootSchema); |
36 | 36 | |
37 | 37 | function expectElement<T extends Element>(element: T | null | undefined, label: string): T { |
38 | | -expect(element, label).toEqual(expect.any(Element)); |
39 | | -if (!element) { |
| 38 | +expect(element instanceof Element, label).toBe(true); |
| 39 | +if (!(element instanceof Element)) { |
40 | 40 | throw new Error(`missing ${label}`); |
41 | 41 | } |
42 | 42 | return element; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。