ADD istanbul for code coverage

This commit is contained in:
unpregnant 2017-02-16 19:38:18 +01:00
parent f778465728
commit c836f93a5e
4 changed files with 14 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
npm-debug.*
node_modules
electroshot-config.json
.nyc_output/

View File

@ -22,12 +22,11 @@
"server": "node --harmony-async-await src/app.js",
"less": "node --harmony-async-await src/less.js",
"babel": "babel --presets es2015 src/public/javascript.js -o public/javascript.js",
"readme": "node --harmony-async-await src/RenderReadMe.js",
"start": "npm run babel && npm run less && npm run server",
"dev": "watch 'npm start' src/ resumes/ less/",
"pdf": "npm run babel && npm run less && node --harmony-async-await src/generatePdfs.js",
"lint": "eslint src/",
"test": "mocha --harmony-async-await \"test/*.js\"",
"test": "nyc mocha --harmony-async-await \"test/*.js\"",
"istanbul": "istanbul cover node_modules/.bin/_mocha -- -- -u exports test/**/* --harmony-async-await"
},
"dependencies": {
@ -68,7 +67,7 @@
},
"devDependencies": {
"eslint": "3.15.0",
"istanbul": "^0.4.5",
"mocha": "3.2.0"
"mocha": "3.2.0",
"nyc": "10.1.2"
}
}

9
test/Config.js Normal file
View File

@ -0,0 +1,9 @@
/* global it, describe */
const assert = require('assert');
const Config = require('../src/Config');
describe('Config', () => {
it('should have property port', () => {
assert(Config.port != null);
assert(typeof Config.port == 'number');
});
});

View File

@ -1 +1 @@
alskldjaksldjaklsjdla0.6817729887314716
alskldjaksldjaklsjdla0.4110614003605342