gulp.task('test', function () { return gulp.src(['test/**/*.js'], {read: false}) .pipe(mocha({reporter: 'spec'})) .on('error', util.log); });
gulp.task('js-test', function () { gulp.src('test/*.js') .pipe(mocha({ reporter: 'spec', //reporter: 'nyan', clearRequireCache: true, ignoreLeaks: true })); });
gulp.task('coverage', [ 'lint' ], function (done) { gulp.src(sources) .pipe(istanbul()) .pipe(istanbul.hookRequire()) .on('error', errorHandler) .on('finish', function () { gulp.src('test/**/*.js') .pipe(mocha()) .pipe(istanbul.writeReports({ dir: 'dist/coverage/' })) .on('finish', done); }); });
gulp.task('integration-tests', () => { return gulp.src("tests/integration/run.js") .pipe(mocha()) .on('error', (error) => { console.error(error.message); console.error(error.stack); process.exit(1); }) .on('end', () => process.exit(0)) });
gulp.task("test-without-coverage", function () { return gulp.src(paths.testFiles) .pipe(mocha()) .on("error", function () { console.log(chalk.bold.bgRed(" TESTS FAILED ")); }); });
gulp.task('non-terminating-unit-tests', () => { return gulp.src("tests/specs/**/*.js") .pipe(mocha()) .on('error', (error) => { console.error(error.message); console.error(error.stack); process.exit(1); }) });
gulp.task('test-recursive', function () { mochaOpts.recursive = true; return gulp.src(testPaths.recursive) .pipe(mocha(mochaOpts)) .on('error', console.warn.bind(console)); });
gulp.task('test', ['coverage'], function() { return gulp.src('test/*.js') .pipe(mocha({reporter: 'spec'})) .pipe(istanbul.writeReports()); });
gulp.task('test', function () { gulp.src('test/**/*.js') .pipe(mocha({reporter: 'nyan'})) .on('error', function(err){ console.log(err.toString()); this.emit('end'); }); });
gulp.task('testOpts', function () { mochaOpts.reporterOptions = { reportDir: 'customDir', reportName: 'customName', reportTitle: 'customTitle', inlineAssets: true, autoOpen: true }; return gulp.src(testPaths.basic) .pipe(mocha(mochaOpts)) .on('error', console.warn.bind(console)); });
gulp.task('test', function () { return gulp.src('./test/*.js', { read: false }) // gulp-mocha needs filepaths so you can't have any plugins before it .pipe(mocha({ reporter: 'spec' })) .on('error', handleError); });
gulp.task('test', ['coverage'], function() { return gulp.src('test/*.js') .pipe(mocha({reporter: 'spec'})) .pipe(istanbul.writeReports()); });
gulp.task('test', ['pre-test'], function () { return gulp.src(TEST_CODE) .pipe(mocha()) // Creating the reports after tests ran .pipe(istanbul.writeReports()); });
/** * This tasks pipes our test files through mocha to run automated tests. */ gulp.task('test',function(){ gulp.src(['test/**/*.js']) .pipe(mocha()); });
gulp.task('test', function () { return gulp.src(testPaths.basic) .pipe(mocha(mochaOpts)) .on('error', console.warn.bind(console)); });