8000 Integrates mocha with gulp · jasonLaster/sprintf.js@feaded3 · GitHub
[go: up one dir, main page]

Skip to content

Commit feaded3

Browse files
committed
Integrates mocha with gulp
1 parent fb9b3fe commit feaded3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

gulpfile.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var pkg = require('./package.json'),
77
sourcemaps = require('gulp-sourcemaps'),
88
header = require('gulp-header'),
99
jshint = require('gulp-jshint'),
10+
mocha = require('gulp-mocha'),
1011
banner = '/*! <%= pkg.name %> v<%= pkg.version %> | Copyright (c) 2007-present, <%= pkg.author %> | <%= pkg.license %> */\n'
1112

1213
gulp.task('lint', function() {
@@ -16,7 +17,13 @@ gulp.task('lint', function() {
1617
.pipe(jshint.reporter('default'))
1718
})
1819

19-
gulp.task('dist', ['lint'], function() {
20+
gulp.task('test', ['lint'], function() {
21+
return gulp
22+
.src('test/*.js', {read: false})
23+
.pipe(mocha({reporter: 'nyan'}));
24+
})
25+
26+
gulp.task('dist', ['test'], function() {
2027
return gulp.src([
2128
'src/*.js'
2229
])

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"gulp": "^3.9.0",
1818
"gulp-header": "^1.7.1",
1919
"gulp-jshint": "^2.0.0",
20+
"gulp-mocha": "^2.2.0",
2021
"gulp-rename": "^1.2.2",
2122
"gulp-sourcemaps": "^1.6.0",
2223
"gulp-uglify": "^1.5.1",

0 commit comments

Comments
 (0)
0