Skip to content

Commit a534acf

Browse files
committed
test(heureka): fix ErrorBoundary className test assertion
Replace nodeName check with querySelector("div[class]") — the Component renders a plain <div> so container.firstChild is always a DIV regardless of the wrapper, making the previous assertion always fail.
1 parent 2b1ad32 commit a534acf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/heureka/src/components/common/ErrorBoundary/index.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ describe("ErrorBoundary", () => {
5858
<Component />
5959
</ErrorBoundary>
6060
)
61-
expect(container.firstChild?.nodeName).not.toBe("DIV")
61+
// Children are rendered directly — no extra wrapper div with a class attribute
62+
expect(container.querySelector("div[class]")).toBeNull()
6263
expect(screen.getByText("Some Component")).toBeInTheDocument()
6364
})
6465

0 commit comments

Comments
 (0)