Home > Back-end >  How can I use jest on React using npm?
How can I use jest on React using npm?

Time:12-02

My application is made using create react app and npm. In the jest's official documentation, https://jestjs.io/docs/tutorial-react , they only have information about testing CRA apps using yarn. Does this mean we cannot use jest to test our React app using npm?

CodePudding user response:

You can use jest with CRA, in fact it's already built-in to CRA.

Try run npm test

Read more details here https://create-react-app.dev/docs/running-tests

  • Related