To create Jest tests for a component, create a folder called
__tests__ at the top level of the component’s folder. Save the tests inside the
__tests__ directory. Test files must have names that end in
.js, and we recommend that tests end in
.test.js. You can have a single test file with all of your component tests, or you can have multiple files to organize related tests. Test files can be placed in sub folders.