samedi 18 mai 2019

Running all the spec files using * wild card

I am running test for node app using mocha. Inside package.json I have written script to run all spec files together using '*'. But I see only one spec file is run.

inside test folder

test.spec.js

test1.spec.js

I am running command : npm run tests. I am still only one test at a time.

package.json

"scripts":{
"tests": " mocha ./server/routes/test/*.spec.js"
}

I also tried 
"tests": " mocha ./server/routes/test/*.spec.js --recursive"

Aucun commentaire:

Enregistrer un commentaire