Skip to content

Commit

Permalink
Introduce code coverage with Isparta/Istanbul
Browse files Browse the repository at this point in the history
  • Loading branch information
jednano committed Aug 21, 2015
1 parent 0c217d3 commit 1b5bae7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -6,3 +6,5 @@ npm-debug.log

build/
/postcss.js

coverage/
2 changes: 2 additions & 0 deletions .npmignore
Expand Up @@ -12,3 +12,5 @@ appveyor.yml

gulpfile.babel.js
logo.svg

coverage/
8 changes: 1 addition & 7 deletions gulpfile.babel.js
Expand Up @@ -71,12 +71,6 @@ gulp.task('integration', ['build:lib', 'build:package'], (done) => {
});
});

gulp.task('test', () => {
require('./');
let mocha = require('gulp-mocha');
return gulp.src('test/*.es6', { read: false }).pipe(mocha());
});

// Common

gulp.task('default', ['lint', 'spellcheck', 'test', 'integration']);
gulp.task('default', ['lint', 'spellcheck', 'integration']);
7 changes: 5 additions & 2 deletions package.json
Expand Up @@ -32,12 +32,13 @@
"babel-eslint": "4.0.10",
"gulp-eslint": "1.0.0",
"gulp-babel": "5.2.1",
"gulp-mocha": "2.1.3",
"strip-ansi": "3.0.0",
"yaspeller": "2.5.0",
"gulp-util": "3.0.6",
"gulp-run": "1.6.10",
"fs-extra": "0.23.1",
"istanbul": "0.3.18",
"isparta": "3.0.3",
"eslint": "1.2.1",
"sinon": "1.16.1",
"mocha": "2.2.5",
Expand All @@ -46,6 +47,8 @@
"del": "1.2.1"
},
"scripts": {
"test": "gulp"
"check-coverage": "istanbul check-coverage --statements 89.12 --branches 81.85 --functions 87.29 --lines 91.71",
"cover": "isparta cover node_modules/mocha/bin/_mocha -i lib/*.es6",
"test": "gulp && npm run cover && npm run check-coverage"
}
}

0 comments on commit 1b5bae7

Please sign in to comment.