2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2025-04-10 15:51:52 +00:00

Fix bug in mocha where next task is executed before mocha callback

This commit is contained in:
Jia Hao 2016-02-25 19:01:56 +08:00
parent 31ee80f84f
commit c4700fcb7b

View File

@ -105,8 +105,8 @@ gulp.task('test', callback => {
return runSequence('prune', 'mocha', callback); return runSequence('prune', 'mocha', callback);
}); });
gulp.task('mocha', ['build'], () => { gulp.task('mocha', ['build'], done => {
return gulp.src(PATHS.CLI_DEST_JS) gulp.src(PATHS.CLI_DEST_JS)
.pipe(istanbul({includeUntested: true})) .pipe(istanbul({includeUntested: true}))
.on('finish', () => { .on('finish', () => {
return gulp.src(PATHS.TEST_DEST_JS, {read: false}) return gulp.src(PATHS.TEST_DEST_JS, {read: false})
@ -115,7 +115,10 @@ gulp.task('mocha', ['build'], () => {
dir: './coverage', dir: './coverage',
reporters: ['lcov'], reporters: ['lcov'],
reportOpts: {dir: './coverage'} reportOpts: {dir: './coverage'}
})); }))
.on('finish', () => {
done();
});
}); });
}); });