When a component uses setState() the componentDidUpdate call is supposed to fire and any code within it is supposed to be executed. Enzyme 3.4.1 does not execute the cDU code when setState() is called within the component.
To Reproduce
Steps to reproduce the behavior:
npm install [email protected]componentDidUpdate method and another method that calls setState(). The cDU method should execute the callback when it's fired.setState()Expected behavior
cDU should be executed when a component's setState is called.
Desktop (please complete the following information):
Additional context
https://github.com/airbnb/enzyme/issues/1452
https://github.com/airbnb/enzyme/pull/1742#issuecomment-413341308
Code Sample
@ajbogh https://github.com/airbnb/enzyme/pull/1742 isn't included v3.4.1 so please wait for the next release!
Oh. Thanks @koba04. My mistake. I'll check back when the release happens.
v3.4.2 is released; I'll reopen this if the issue isn't addressed.
v3.4.2 fixed the issue! Thanks for the great work.
Most helpful comment
v3.4.2 fixed the issue! Thanks for the great work.