I'm learning ReactJS for a few weeks but I'm facing an issue that's impossible to solve by myself.
I use create-react-app command to start react project but it is totally impossible to use npm test after that. Even if I don't touch anything in the project, when I try to run npm test I only get "No tests found, exiting with code 0".... When I just create the project there is src/App.test.js but the command found nothing..... :(
Someone I sent the folder succeeded to run the tests.... is it possible that the problem comes from my computer/environment (Windows 10) ?
Thanks for help.
Have a good day
Add this line to your "package.json"
open package.json
find scripts in that "test" : "react scripts test" replace this with
"test": "react-scripts test --watchAll --testMatch **/src/**/*.test.js"
Now run npm test.
It works!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With