Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create react app : configure Jest : Run all test files

I would like to configure npm test in my server. when I run npm test, it invokes react-scripts test which triggers a prompt window ( attached screen ). How do I avoid the prompt and run all testcases in the server.

"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"lint": "./node_modules/.bin/eslint ."
},

enter image description here

like image 456
kulls Avatar asked Sep 17 '19 06:09

kulls


1 Answers

To run all the tests, use "test": "react-scripts test --watchAll=false"

like image 96
Riya Adhikari Avatar answered Sep 25 '22 13:09

Riya Adhikari