Run only certain mocha test:
Suppose you have tests structured by describe
sections:
describe('group1', function () { describe('subgrp1', function () { it('name1', function (done) { ....
Filter tests when run
npm run test -- -g 'name1' npm run test -- -g 'group1' npm run test -- -g 'subgrp1'
with next in package.json
:
"scripts": { "test": "mocha" }
or just without npm
mocha -g "name1"