diff --git a/ui/src/ui/config-form.browser.test.ts b/ui/src/ui/config-form.browser.test.ts index 92600faf699..c9283bc83ad 100644 --- a/ui/src/ui/config-form.browser.test.ts +++ b/ui/src/ui/config-form.browser.test.ts @@ -35,8 +35,8 @@ const rootSchema = { const rootAnalysis = analyzeConfigSchema(rootSchema); function expectElement(element: T | null | undefined, label: string): T { - expect(element, label).toEqual(expect.any(Element)); - if (!element) { + expect(element instanceof Element, label).toBe(true); + if (!(element instanceof Element)) { throw new Error(`missing ${label}`); } return element;