-
Notifications
You must be signed in to change notification settings - Fork 13
/
gulpfile.js
34 lines (26 loc) · 823 Bytes
/
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
/* eslint-disable */
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const mocha = require('gulp-mocha');
const qunit = require('./index');
const paths = {
scripts: ['./*.js', '!./gulpfile.js']
};
gulp.task('lint', () => gulp.src(paths.scripts)
.pipe(eslint({fix: true}))
.pipe(eslint.format()));
gulp.task('test', () => gulp.src('./test/*.js')
.pipe(mocha()));
gulp.task('qunit:pass', () => {
qunit('./test/fixtures/passing.html');
});
gulp.task('qunit:fail', () => {
qunit('./test/fixtures/failing.html');
});
gulp.task('qunit-verbose', () => {
qunit('./test/fixtures/passing.html', { 'verbose': true });
});
gulp.task('watch', () => {
gulp.watch(paths.scripts, gulp.parallel('lint', 'test'));
});
gulp.task('default', gulp.parallel('lint', 'test', 'watch'));