Adding a tests folder

To add the client-side test in the MERN Social application, we will create a folder called tests in the client folder, which will contain test files relevant to testing the React components. When the test command is run, Jest will look for the test code in these files.

The test case for this example will be a test on the Post component, and tests for the Post component will be added in a file called post.test.js in the tests folder.

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.