How to test your React App with Jest
MIT License
The following scenarios will be covered:
Counter
]ScreenWidth
, PageURL
]All component tests
]PageURL
]Reminder
]ScreenWidth
]The components and tests are in ./src/components
.
The tests for Component.jsx
are in Component.test.jsx
.
In the project directory, you can run:
npm start
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
npm test
Runs the tests in watch mode.
npm run test:watch
Runs the tests in watch mode and shows the test coverage.