forked from edenadler/testcafe-reporter-slack-errors-only
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGulpfile.js
44 lines (37 loc) · 1.3 KB
/
Gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
var gulp = require('gulp');
var babel = require('gulp-babel');
var mocha = require('gulp-mocha');
var del = require('del');
gulp.task('clean', function () {
return del('lib');
});
gulp.task('build', gulp.series('clean', function build () {
return gulp
.src('src/**/*.js')
.pipe(babel())
.pipe(gulp.dest('lib'));
}));
gulp.task('watch', gulp.series('build', function () {
gulp.watch('src/*.js', 'build');
}));
gulp.task('test', function test (done) {
// return gulp
// .src('test/**.js')
// .pipe(mocha({
// ui: 'bdd',
// reporter: 'spec',
// inspect: true,
// timeout: typeof v8debug === 'undefined' ? 2000 : Infinity // NOTE: disable timeouts in debug
// }));
done();
});
gulp.task('preview', gulp.series('build', function preview () {
var buildReporterPlugin = require('testcafe').embeddingUtils.buildReporterPlugin;
var pluginFactory = require('./lib');
var reporterTestCalls = require('./test/utils/reporter-test-calls');
var plugin = buildReporterPlugin(pluginFactory);
reporterTestCalls.forEach(function (call) {
plugin[call.method].apply(plugin, call.args);
});
process.exit(0);
}));