javascript - mocha run tests twice -
i have several tests node js express application written in coffeescript run under mocha control. unfortunately mocha runs tests twice, becouse in same directory jave .coffee , .js files. .js files generated editor automatically .map files. that's quite handy if need debug something.
how can filter .coffee or .js executed directory not both of them?
in package.json, create entries following:
"scripts": { "test": "npm run test-coffee", "test-js": "mocha -r spec test/*.js", "test-coffee": "mocha -r spec test/*.coffee" } now can run npm test, npm run test-js, or npm run test-coffee. if have tests in subdirectories, want use find command run subtests you're interested in.
Comments
Post a Comment