Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Jun 20, 2020
1 parent f94a426 commit b4d0a6a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/solid/test/dom/switch.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});

Expand Down

0 comments on commit b4d0a6a

Please sign in to comment.