forked from jonkemp/node-qunit-phantomjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
35 lines (27 loc) · 808 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
35
'use strict';
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
mocha = require('gulp-mocha'),
qunit = require('./index');
var paths = {
scripts: ['./*.js', './test/*.js', '!./lib', '!./gulpfile.js']
};
gulp.task('lint', function() {
return gulp.src(paths.scripts)
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('test', function() {
return gulp.src('./test/*.js')
.pipe(mocha({reporter: 'dot'}));
});
gulp.task('qunit', function() {
qunit('./test/fixtures/passing.html');
});
gulp.task('qunit-verbose', function() {
qunit('./test/fixtures/passing.html', { 'verbose': true });
});
gulp.task('watch', function () {
gulp.watch(paths.scripts, ['lint', 'test']);
});
gulp.task('default', ['lint', 'test', 'watch']);