add coverage tools to habitrpg-shared

This commit is contained in:
Aneesh Goel
2014-09-19 03:11:13 -07:00
parent 30be8749c4
commit d7970d1dd2
3 changed files with 11 additions and 1 deletions
+1
View File
@@ -1,3 +1,4 @@
coverage.html
node_modules
npm-debug.log
.idea
+3 -1
View File
@@ -10,6 +10,7 @@
"grunt-spritesmith": "~1.22.0"
},
"devDependencies": {
"coffee-coverage": "~0.4.2",
"mocha": "*",
"expect.js": "*",
"sinon": "~1.8.2",
@@ -21,6 +22,7 @@
"image-size": "~0.3.2"
},
"scripts": {
"test": "mocha"
"test": "mocha",
"coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html"
}
}
+7
View File
@@ -0,0 +1,7 @@
if(process.env.COVERAGE) {
require('coffee-coverage').register({
path: 'abbr',
basePath: __dirname + '/script',
initAll: true,
});
}