mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
add coverage tools to habitrpg-shared
This commit is contained in:
parent
30be8749c4
commit
d7970d1dd2
3 changed files with 11 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
coverage.html
|
||||
node_modules
|
||||
npm-debug.log
|
||||
.idea
|
||||
|
|
|
|||
|
|
@ -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
register-handlers.js
Normal file
7
register-handlers.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
if(process.env.COVERAGE) {
|
||||
require('coffee-coverage').register({
|
||||
path: 'abbr',
|
||||
basePath: __dirname + '/script',
|
||||
initAll: true,
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue