DEV Community

Discussion on: Testing React Hook State Changes

Collapse
 
kevinding0218 profile image
Kevin Ding • Edited

Hi, thanks for sharing the tutorial! However, things might still not work for me, and I am not sure how did useStateSpy connected with the Enzyme.shallow(<TestComponent />); in your test case...

In addition, my wrapper by shallow turns out to be null, but when I use mount it can show me correct component.