Now that you know how to run Jest, let's write some unit tests. We'll cover the basics as well as the more advanced features of Jest available for testing React apps. We'll start organizing your tests into suites and the basic assertions available in Jest. Then, you'll create your first mock module and work with asynchronous code. Lastly, we'll use Jest's snapshotting mechanism to help test React component output.
Writing Jest tests
Organizing tests using suites
Suites are the main organizational unit of your tests. Suites aren't a Jest requirement—the test that create-react-app creates does not include a suite:
it('renders without crashing', () => { ... });
The it...