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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -