1 | 'use strict';
|
2 |
|
3 | const gulp = require('gulp');
|
4 | const settings = require('./settings.json');
|
5 | const plugins = require('gulp-load-plugins')(settings.plugins);
|
6 |
|
7 | const { argv } = require('yargs');
|
8 |
|
9 | gulp.task('test-unit', (done) => gulp.src(argv['test-files'] || settings.units, {read: false})
|
10 | .pipe(plugins.plumber())
|
11 | .pipe(plugins.mocha({
|
12 | reporter: 'dot',
|
13 | require: [
|
14 | '@babel/register',
|
15 | 'ignore-styles',
|
16 | ],
|
17 | }))
|
18 | .on('end', () => done())
|
19 | .on('error', (err) => done(err))
|
20 | );
|