2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-11-15 17:27:08 +00:00
nativefier/gulp/tests/mocha.js
2016-02-28 00:45:44 +08:00

23 lines
686 B
JavaScript

import gulp from 'gulp';
import PATHS from './../helpers/src-paths';
import istanbul from 'gulp-istanbul';
import mocha from 'gulp-mocha';
gulp.task('mocha', ['build'], done => {
gulp.src(PATHS.CLI_DEST_JS)
.pipe(istanbul({includeUntested: true}))
.on('finish', () => {
return gulp.src(PATHS.TEST_DEST_JS, {read: false})
.pipe(mocha())
.pipe(istanbul.writeReports({
dir: './coverage',
reporters: ['lcov'],
reportOpts: {dir: './coverage'}
}))
.on('finish', () => {
done();
});
});
});