Skip to content

Commit a426244

Browse files
committed
Add missing test for unmount
1 parent 5ce4d9d commit a426244

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/__tests__/render.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,15 @@ test('baseElement matches container if not custom baseElement is provided', () =
7575
</blink>
7676
`)
7777
})
78+
79+
test('unmounts', () => {
80+
const {getByTestId, unmount, queryByTestId} = render({
81+
template: `<div data-testid="node">Hi</div>`,
82+
})
83+
84+
expect(getByTestId('node')).toBeInTheDocument()
85+
86+
unmount()
87+
88+
expect(queryByTestId('node')).not.toBeInTheDocument()
89+
})

0 commit comments

Comments
 (0)