Skip to content

Instantly share code, notes, and snippets.

@iamdustan
Created April 1, 2014 15:01
Show Gist options
  • Save iamdustan/9915940 to your computer and use it in GitHub Desktop.
Save iamdustan/9915940 to your computer and use it in GitHub Desktop.
var gulp = require('gulp');
module.exports = function(config) {
var src = config.paths.test
return function() {
var browserify = require('gulp-browserify');
var karma = require('gulp-karma');
var es6ify = require('es6ify');
return gulp.src(src)
.pipe(browserify({
debug: true,
add: [ es6ify.runtime ],
transform: ['reactify', 'es6ify']
}))
.pipe(karma({
configFile: 'karma.conf.js',
action: 'run'
}))
.on('error', function(err) {
// Make sure failed tests cause gulp to exit non-zero
throw err;
});
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment