mirror of
https://github.com/wassname/talk.git
synced 2026-07-29 11:28:24 +08:00
Update ToggleShow.spec.tsx
This commit is contained in:
@@ -18,13 +18,13 @@ it("renders correctly", () => {
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should work correctly", () => {
|
||||
it("should hide the div", () => {
|
||||
const renderer = create(
|
||||
<ToggleShow>
|
||||
{({ toggleShow, show }) => (
|
||||
<div>
|
||||
{show && <div>SHOW ME</div>}
|
||||
<button onClick={toggleShow}>Click me and I disapear</button>
|
||||
<button onClick={toggleShow}>Click me and I disappear</button>
|
||||
</div>
|
||||
)}
|
||||
</ToggleShow>
|
||||
|
||||
Reference in New Issue
Block a user