Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
coveragePost() {
chai.should();
// chai.use(require("sinon-chai"));
// chai.use(require("chai-as-promised"));
return gulp.src([
"./build/compiled/test/functional/**/*.js",
"./build/compiled/test/issues/**/*.js",
])
.pipe(mocha())
.pipe(istanbul.writeReports());
}
function runner() {
return gulp
.src(testGlob)
.pipe(mocha(mochaOpts))
// .on('error', function (err) {
// gutil.log(err);
// this.emit('end');
// })
.pipe(istanbul.writeReports())
.on('end', cb);
}
coveragePost() {
chai.should();
chai.use(require("sinon-chai"));
chai.use(require("chai-as-promised"));
return gulp.src(["./build/compiled/test/**/*.js"])
.pipe(mocha())
.pipe(istanbul.writeReports());
}
function test() {
gulp.src(['./test/**/*.js'], { read: false })
.pipe(mocha())
.pipe(istanbul.writeReports({
dir: 'test-coverage/',
reportOpts: {
dir: 'test-coverage/'
},
reporters: ['lcov', 'text', 'text-summary', 'cobertura']
}))
.pipe(istanbul.enforceThresholds({ thresholds: { global: 1 } }));
return gulp.src('test-coverage/lcov.info')
.pipe(coveralls());
}
function test() {
gulp.src(['./test/**/*.js'], { read: false }).pipe(mocha()).pipe(istanbul.writeReports({
dir: 'test-coverage/',
reportOpts: {
dir: 'test-coverage/'
},
reporters: ['lcov', 'text', 'text-summary', 'cobertura']
})).pipe(istanbul.enforceThresholds({ thresholds: { global: 1 } }));
return gulp.src('test-coverage/lcov.info').pipe(coveralls());
}
gulp.task('test', ['pre-test'], function (cb) {
var mochaErr;
gulp.src('test/**/*.js')
.pipe(plumber())
.pipe(mocha({reporter: 'spec'}))
.on('error', function (err) {
mochaErr = err;
})
.pipe(istanbul.writeReports())
.on('end', function () {
cb(mochaErr);
});
});
.on('finish', function(){
gulp.src(paths.tests)
.pipe(mocha())
.pipe(istanbul.writeReports());
});
});
.on('finish', function () {
gulp.src(files.test)
.pipe(mocha({reporter: 'dot'}))
.pipe(istanbul.writeReports({
dir: './coverage',
reporters: ['lcov', 'json', 'html'],
reportOpts: { dir: './coverage' }
}))
.on('end', done);
});
});
function runner() {
gulp
.src(['./test/main.js'])
.pipe(mocha(mochaOpts))
.pipe(istanbul.writeReports())
.on('end', cb);
}
.on('finish', function() {
gulp.src(paths.testFiles)
.pipe(mochaDefault)
.pipe(istanbul.writeReports(paths.coverageDir));
});
});