Skip to content

Instantly share code, notes, and snippets.

@thomastuts
Created October 24, 2014 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomastuts/6bdcbb2f4dc71c9d5312 to your computer and use it in GitHub Desktop.
Save thomastuts/6bdcbb2f4dc71c9d5312 to your computer and use it in GitHub Desktop.
Test tasks
var gulp = require('gulp');
var open = require('gulp-open');
var karma = require('karma').server;
var protractor = require('gulp-protractor').protractor;
var paths = require('./paths');
module.exports = {
unit: function (done) {
karma.start({
configFile: paths.tests.unit.config,
singleRun: true
}, done);
},
unitCoverage: function () {
gulp.src('test/coverage/index.html')
.pipe(open("<%file.path%>"));
},
e2e: function () {
return gulp.src(paths.tests.e2e.testFiles)
.pipe(protractor({
configFile: paths.tests.e2e.config
}))
.on('error', function (e) {
throw e;
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment