You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vestride_Shuffle/gulp/tasks/test.js

23 lines
529 B
JavaScript

const gulp = require('gulp');
const mochaPhantomJS = require('gulp-mocha-phantomjs');
const config = require('../config');
module.exports = function test() {
return gulp.src('test/runner.html', {
read: false,
})
.pipe(mochaPhantomJS({
phantomjs: {
useColors: true,
},
}))
// https://github.com/gulpjs/gulp/issues/259#issuecomment-61976830
.on('error', function onerror(err) {
if (config.watch) {
console.error(err.message);
this.emit('end');
}
});
};