-
Notifications
You must be signed in to change notification settings - Fork 47.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix act() tests by properly unmounting the container
While playing around with the new `act()` API I discovered a test that was unexpectedly failing. After some digging I noticed that the test is passing when run in isolation and that the test suite can be fixe by properly calling `ReactDOM.unmountComponentAtNode()` to clean up after every test run. You can reproduce the issue by simply commenting out the call to `unmountComponentAtNode` in the `afterEach` callback. The newly added test will fail but pass in isolation. I thought it would be a good idea to fix this upstream so nobody runs into this issue again.
- Loading branch information
1 parent
3ada82b
commit b5e91d5
Showing
1 changed file
with
55 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters