Thursday, November 3, 2022

Running Only One Test.js File in Mocha

 

So in this project I have myexec.test.js inside of test directory as shown below

And then I would like to run only myexec.test.js, so in my package.json, I put this

so in line 15. "myexec": "mocha ./test/myexec.test.js". It means when I run

npm run myexec 

Then it will gonna run only myexec.test.js file....

Here is the result:


niceee.... Hope this usefull hahaha... *kidding...

No comments:

Post a Comment