forked from frankwallis/gulp-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit test task with code coverage and dependencies, update test s…
…cript
- Loading branch information
Showing
3 changed files
with
23 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
var gulp = require('gulp'); | ||
|
||
var istanbul = require('gulp-istanbul'); | ||
var mocha = require('gulp-mocha'); | ||
|
||
gulp.task('bump', ['compile'], function(){ | ||
return gulp.src('./package.json') | ||
.pipe(bump({type:'minor'})) | ||
.pipe(gulp.dest('./')); | ||
}); | ||
}); | ||
|
||
gulp.task('test', function (cb) { | ||
gulp.src('lib/**/*.js') | ||
.pipe(istanbul()) // Covering files | ||
.on('finish', function () { | ||
gulp.src(['test/*.js']) | ||
.pipe(mocha()) | ||
.pipe(istanbul.writeReports()) // Creating the reports after tests runned | ||
.on('end', cb); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ | |
"email": "[email protected]" | ||
}, | ||
"contributors": [ | ||
"Rob McGuire-Dale <[email protected]>", | ||
"Andrew Gatlabayan <[email protected]>" | ||
"Rob McGuire-Dale <[email protected]>", | ||
"Andrew Gatlabayan <[email protected]>" | ||
], | ||
"repository": { | ||
"type": "git", | ||
|
@@ -29,7 +29,7 @@ | |
"node": ">= 0.8.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha --ui bdd --reporter spec" | ||
"test": "gulp test" | ||
}, | ||
"dependencies": { | ||
"glob": "^4.0.2", | ||
|
@@ -41,10 +41,12 @@ | |
"devDependencies": { | ||
"gulp": "^3.5.5", | ||
"gulp-bump": "^0.1.8", | ||
"gulp-istanbul": "^0.2.1", | ||
"gulp-mocha": "^0.5.2", | ||
"mocha": "^1.21.3", | ||
"proxyquire": "^1.0.1", | ||
"should": "^4.0.4", | ||
"sinon": "^1.10.3", | ||
"mocha": "^1.21.3" | ||
"sinon": "^1.10.3" | ||
}, | ||
"keywords": [ | ||
"gulp", | ||
|