Skip to content

Commit

Permalink
chore(build): update babel and add code coverage task
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jun 8, 2015
1 parent dc5330e commit 2431069
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
jspm_packages
bower_components
.idea
.DS_STORE
.DS_STORE
build/reports
21 changes: 21 additions & 0 deletions build/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,24 @@ gulp.task('tdd', function (done) {
done();
});
});

/**
* Run test once with code coverage and exit
*/
gulp.task('cover', function (done) {
karma.start({
configFile: __dirname + '/../../karma.conf.js',
singleRun: true,
reporters: ['coverage'],
preprocessors: {
'test/**/*.js': ['babel'],
'src/**/*.js': ['babel', 'coverage']
},
coverageReporter: {
type: 'html',
dir: 'build/reports/coverage'
}
}, function (e) {
done();
});
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@
"jasmine-core": "^2.1.3",
"jshint-stylish": "^1.0.0",
"karma": "^0.12.28",
"karma-babel-preprocessor": "^5.1.0",
"karma-babel-preprocessor": "^5.2.1",
"karma-chrome-launcher": "^0.1.7",
"karma-coverage": "^0.3.1",
"karma-jasmine": "^0.3.5",
"karma-jspm": "^1.1.4",
"karma-jspm": "^1.1.5",
"object.assign": "^1.0.3",
"require-dir": "^0.1.0",
"run-sequence": "^1.0.2",
Expand Down

0 comments on commit 2431069

Please sign in to comment.