DEV Community

Discussion on: Using Jest to check that a React Component doesn't render

Collapse
 
pke profile image
Philipp Kursawe • Edited

Just use expect(render(...).toJSON()).toBeNull(). Its faster than waiting for elements to not appear.

p.s. your example has a typo: it destructures contaner instead of container