diff --git a/packages/solid/test/dom/switch.spec.tsx b/packages/solid/test/dom/switch.spec.tsx index ea945b6f7..ebded2548 100644 --- a/packages/solid/test/dom/switch.spec.tsx +++ b/packages/solid/test/dom/switch.spec.tsx @@ -64,6 +64,15 @@ describe("Testing an only child Switch control flow", () => { expect(div.innerHTML).toBe("fallback"); }); + test("doesn't re-render on same option", () => { + setCount(4); + expect(div.innerHTML).toBe("2"); + const c = div.firstChild; + setCount(4); + expect(div.innerHTML).toBe("2"); + expect(div.firstChild).toBe(c); + }) + test("dispose", () => disposer()); });