You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating an application the App test file contains a unit test and it uses ReactDOM to test that the component is not crashing. Wouldn't it be better to use the React test renderer or Enyme with the mount command? From https://reactjs.org/docs/react-dom.html I understand that ReactDOM should be used for functionality rather than testing.
Please let me know what you think, thanks!
The text was updated successfully, but these errors were encountered:
Test renderer and/or shallow rendering would probably be a better idea in any cases. But we wanted to show the simplest setup possible. One problem with the test renderer is that as soon as you add something that depends on DOM (e.g. Bootstrap or similar), your tests start to fail. Now you have to explain how to mock things out, test components separately, etc. Our users are often beginners and this is a huge topic. So we went with a bare minimum that would work.
After creating an application the App test file contains a unit test and it uses ReactDOM to test that the component is not crashing. Wouldn't it be better to use the React test renderer or Enyme with the mount command? From https://reactjs.org/docs/react-dom.html I understand that ReactDOM should be used for functionality rather than testing.
Please let me know what you think, thanks!
The text was updated successfully, but these errors were encountered: