I am trying to run test cases using mocha framework . I am trying to run it through nodemon
, but getting an error.
I have installed nodemon
already through npm install nodemon
and similarly with mocha
. How do I run my project through nodemon
so that my test cases show the result using mocha framework?
In the Command Prompt, my test cases are not running for whatever I do with nodemon
.
Lets assume you have an entry like following in your package.json - scripts": { "start:test": "mocha test/ --recursive --exit" }
To run the mocha test using nodemon please use the following command: nodemon --exec "npm run start:test"
"test": "nodemon --exec 'mocha -R min'"
然后: npm run test
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.