-
Notifications
You must be signed in to change notification settings - Fork 515
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FAB-932 Gulp task to run tests with coverage reports
"gulp test" to run the whole test bucket "gulp test-headless" to run just the headless tests both should print a report in the output and generate the HTMLs for the coverage report Rebased on latest in master Modified chain names in tests to avoid collision when running together by "gulp test" Change-Id: I477ec4853d29cea241c7a48cdf9609310862c3b2 Signed-off-by: Jim Zhang <[email protected]>
- Loading branch information
1 parent
3262fee
commit 3ca4e6f
Showing
7 changed files
with
39 additions
and
13 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
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,2 +1,28 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'); | ||
require('gulp-npm-test')(gulp); | ||
var tape = require('gulp-tape'); | ||
var tapColorize = require('tap-colorize'); | ||
var istanbul = require('gulp-istanbul'); | ||
|
||
gulp.task('pre-test', function() { | ||
return gulp.src(['lib/**/*.js']) | ||
.pipe(istanbul()) | ||
.pipe(istanbul.hookRequire()); | ||
}); | ||
|
||
gulp.task('test', ['pre-test'], function() { | ||
return gulp.src('test/unit/*.js') | ||
.pipe(tape({ | ||
reporter: tapColorize() | ||
})) | ||
.pipe(istanbul.writeReports()); | ||
}); | ||
|
||
gulp.task('test-headless', ['pre-test'], function() { | ||
return gulp.src('test/unit/headless-tests.js') | ||
.pipe(tape({ | ||
reporter: tapColorize() | ||
})) | ||
.pipe(istanbul.writeReports()); | ||
}); |
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
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
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
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
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