Hi, I think there's a little bug in the example code in the Testing Recipes section.
https://reactjs.org/docs/testing-recipes.html#events
When I copy the code for toggle.js and toggle.test.js into a fresh sample project and run npm run test, I get a failed test.
It looks like the expectations are backwards vs. the initial state in the toggle component.
Hi, I think there's a little bug in the example code in the Testing Recipes section.
https://reactjs.org/docs/testing-recipes.html#events
When I copy the code for
toggle.jsandtoggle.test.jsinto a fresh sample project and runnpm run test, I get a failed test.It looks like the expectations are backwards vs. the initial state in the
togglecomponent.