"use strict";

const gulp     = require('gulp');
const mocha    = require('gulp-mocha');
const eslint   = require('gulp-eslint');
const del      = require('del');
const sequence = require('run-sequence');

const srcDir = './src/';
const srcGlob = srcDir + '*.js';

const testDir = './test/';
const testGlob = testDir + '*.spec.js';

gulp.task('lint', () => {
  return gulp.src(srcGlob)
    .pipe(eslint()) // config in .eslintrc
    .pipe(eslint.format());
});

gulp.task('test', () => {
  return gulp.src(testGlob)
    .pipe(eslint())
    .pipe(eslint.format())
    .pipe(mocha({ reporter: 'spec' }));
});

gulp.task('watch', () => {
  gulp.watch(srcGlob, () => {
    sequence(
      'lint',
      'build'
    );
  });
  gulp.watch(testGlob, ['test']);
});

gulp.task('default', (done) => {
  sequence(
    'test',
    'lint',
    'watch',
    done
  );
});

@@ -654,68 +654,26 @@
 ob, 
-() =%3E %7B%0A    sequence(%0A      'lint',%0A      'build'%0A    );%0A  %7D
+%5B 'lint', 'test' %5D
 );%0A 

simplify watch