mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +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
|
node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
.idea
|
.idea
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
"grunt-spritesmith": "~1.22.0"
|
"grunt-spritesmith": "~1.22.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"coffee-coverage": "~0.4.2",
|
||||||
"mocha": "*",
|
"mocha": "*",
|
||||||
"expect.js": "*",
|
"expect.js": "*",
|
||||||
"sinon": "~1.8.2",
|
"sinon": "~1.8.2",
|
||||||
|
|
@ -21,6 +22,7 @@
|
||||||
"image-size": "~0.3.2"
|
"image-size": "~0.3.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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