gulp.task('test', function() { var mockgoose = require('mockgoose'); var mongoose = require('mongoose'); mockgoose(mongoose); gulp.src('./test/*.js') .pipe(jasmine()) });
function jasmineTestTask() { var terminalReporter = new jasmineReporters.TerminalReporter({ verbosity: 3, color: true, showStack: true }); var junitReporter = new jasmineReporters.JUnitXmlReporter({ savePath: 'target/surefire-reports', consolidateAll: true, filePrefix: 'JasmineReport' }); _startTestWebServer(); gulp.src(testSpecs) .pipe(jasmine({reporter: [terminalReporter, junitReporter, { jasmineDone: function () { gulp.emit('testing_completed'); } }]}) .on('error', function (err) { logger.logError('Jasmine test failures. See console for details (or surefire JUnit report files in target folder).' + err); if (builder.isRebundle() || builder.isRetest()) { notifier.notify('Jasmine test failures', 'See console for details (or surefire JUnit report files in target folder).'); // ignore failures if we are running rebundle/retesting. this.emit('end'); } else { process.exit(1); } }) ) ; }
.on('finish', function () { gulp .src(paths.spec) .pipe(jasmine()) .pipe(istanbul.writeReports()) // Creating the reports after tests runned .on('end', cb); });
function runTests(breakOnError) { return gulp.src(specFiles) .pipe(jasmine({ includeStackTrace: true })) .on('error', errorHandler(breakOnError)); }
gulp.task('test', function() { return gulp.src('spec/*.js') .pipe(jasmine({ // verbose: true, reporter: [new growlReporter(), new specReporter()] })); });
gulp.task('test', ['build'], function () { return gulp.src("test/tests.js").pipe(jasmine({ "stopSpecOnExpectationFailure": false, "random": false, reporter: new JasmineConsoleReporter() })); });
gulp.task("test-verbose", ["concat"], function () { return gulp.src("./test/spec/*.js") .pipe(jasmine({ verbose: true, includeStackTrace: true })); });
gulp.task('js-test', function() { return gulp.src('javascript/test/**/*.test.js') .pipe(jasmine({ verbose: true, includeStackTrace: true })); });
gulp.task('jasmine', function () { return gulp.src('spec/*.js') .pipe(jasmine({ verbose: true })) ; });
gulp.task('jasmine', ['tsc'], function() { return gulp.src(['lib/require.js', 'dist/*.js', 'test/*.js']) .pipe(jasmine({ verbose: true, includeStackTrace: true })); });
gulp.task("test", [ "compile" ], function() { return gulp.src("target/local/test/**/*.js") .pipe(jasmine({ reporter: new reporters.TerminalReporter(), verbose: true })); });
gulp.task('test', ['test:build'], function () { return gulp.src(['tests/*.js']) .pipe(jasmine()) .pipe(istanbul.writeReports()) // Creating the reports after tests ran .on('end', console.log) ; });
gulp.task('test',function() { gulp.src(SPEC_GLOBS).pipe(jasmine({ "verbose": true, "includeStackTrace": true, "reporter": loisLane })); });
gulp.task('test', function(){ var src = srcPath + '/**'; var dist = distPath; return gulp.src(testPath) .pipe(jasmine()); });
gulp.task('test', function () { var error = false; return gulp.src([specWatch, distPath + '/*.js']) .pipe(plumber()) .pipe(jasmine({ verbose: true, })) .on('error', notify.onError(function () { error = true; return { title: 'Jasmine Test Failed', message: 'One or more tests failed, see the cli for details.', }; })) .on('end', function () { if (!error) { notifier.notify({ title: 'Jasmine Test Success', message: 'Every tests passed :)', }); } }) ; });
gulp.task('jasmine', function () { return gulp.src('./lib/**/*-spec.js') .pipe(jasmine({ verbose: true, includeStackTrace: true })); });
gulp.task('test.node', [ 'tsc' ], function () { return gulp.src(opts.testFiles). pipe(jasmine({ verbose: true, includeStackTrace: true })); });
gulp.task('test', function() { return gulp.src('test/spec/*Spec.js') .pipe(jasmine({ verbose: true, includeStackTrace: true, reporter: new reporters.JUnitXmlReporter() })); });
gulp.task('do-test:server', ['pre-test:server'], () => { return gulp.src([`${config.serverDest}/**/*.js`]) .pipe(jasmine()) .pipe(istanbul.writeReports({ dir: `${config.testDest}/coverage-server`, reporters: ['json'] })); });
gulp.task("test+coverage", ["coverage-setup"], function() { // Make sure your tests files are requiring files from the // test-tmp/ directory return gulp.src(CONST.PATTERN_SPECS) .pipe(gjasmine(CONST.OPTS_JASMINE)) // Creating the reports after tests ran .pipe(istanbul.writeReports(CONST.OPTS_ISTANBUL)); });
gulp.task('test', function(){ gulp.src(config.specs) .pipe(jasmine(config.options)) .on('error', notify.onError({ title: 'Test failed', message: 'One or more tests for failed' })); });
gulp.task('jasmine', function () { gulp .src(paths.spec) .pipe(jasmine({ includeStackTrace: true, verbose: true })); });
function test() { return gulp.src(['spec/**/*-spec.js']) .pipe(jasmine()) .pipe(istanbul.writeReports()) .pipe(istanbul.enforceThresholds({thresholds: {global: 90}})); }
.on('finish', function () { gulp.src(['spec/**/*.js']) .pipe(jasmine({ verbose: true })) .pipe(istanbul.writeReports()) .on('end', cb); });
gulp.task('unit-tests', function() { return gulp.src('spec/unit.js') .pipe(jasmine({ //reporter: new reporters.JUnitXmlReporter() //, verbose: true //, includeStackTrace: true })) })
.on('finish', function() { gulp.src([paths.spec]) .pipe(jasmine()) .pipe(istanbul.writeReports({ dir: 'build/coverage', reportOpts: {dir: 'build/coverage'} })); });
gulp.task("test", function () { var jasmine = require("gulp-jasmine"); // https://github.com/sindresorhus/gulp-jasmine // add reporter: https://github.com/sindresorhus/gulp-jasmine/issues/8 // require("minijasminenode"); // puts jasmine in global namespace // require("jasmine-reporters"); // depends on jasmine in global namespace // .pipe(jasmine({ verbose: true, reporter: new jasmine.JUnitXmlReporter() })); return gulp.src("./test/*.spec.js").pipe(jasmine({ verbose: true })); });
gulp.task("jasmine", function() { return gulp.src([ "spec/**/*.js" ]) .pipe(jasmine({ verbose: false })); });
gulp.task( 'test', () => { return gulp.src( [ `${__dirname}/spec/**/*.js` ] ) .pipe( jasmine( { reporter: new reporters.JUnitXmlReporter( { savePath: `${__dirname}/test-results` } ) } ) ) } );
gulp.task('_integration', function () { gutil.log(gutil.colors.green("INTEGRATION STARTED")); return gulp.src(SRC.integrationTest).pipe(jasmine({ reporter: reporters.getReporters(), verbose: false, includeStackTrace: true })) });