2.0.0 • Published 5 years ago
gulp-lab v2.0.0
gulp-lab
Gulp test runner for Lab.
Gulp-lab supports the same options as Lab.
Install
npm install gulp-lab --save-dev
@hapi/lab
"@hapi/lab" package is supported in version 2.0. \ The older version called "lab" is supported in version 1.0.8.
NOTES
Gulp-lab can be used with String, Array and Object options or without.
Gulp-lab can emit an Error when tests fails. Simply use options object with property "emitLabError" on true! By default, "emitLabError" is false.
Example 1 - without options
// gulpfile.js
var gulp = require('gulp');
var lab = require('gulp-lab');
gulp.task('test', function () {
return gulp.src('test')
.pipe(lab());
});
gulp.task('default', ['test']);
Example 2 - options by a String
// gulpfile.js
var gulp = require('gulp');
var lab = require('gulp-lab');
gulp.task('test', function () {
return gulp.src('test')
.pipe(lab('-v -l -C'));
});
gulp.task('default', ['test']);
Example 3 - options by an Array
// gulpfile.js
var gulp = require('gulp');
var lab = require('gulp-lab');
gulp.task('test', function () {
return gulp.src('test')
.pipe(lab(['-v', '-l', '-C']));
});
gulp.task('default', ['test']);
Example 4 - options by an Object in conjunction with JSHint
NOTE: args property can be either a String or an Array and is OPTIONAL!
// gulpfile.js
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var lab = require('gulp-lab');
gulp.task('test', function () {
return gulp.src('./test/**/*.js')
.pipe(lab({
args: '-v -C',
opts: {
emitLabError: true
}
}))
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('default', ['test']);
2.0.0
5 years ago
1.0.8
6 years ago
1.0.7
7 years ago
1.0.6
8 years ago
1.0.5
9 years ago
1.0.4
9 years ago
1.0.3
9 years ago
1.0.2
10 years ago
1.0.0
10 years ago
0.0.10
10 years ago
0.0.9
10 years ago
0.0.8
10 years ago
0.0.7
10 years ago
0.0.6
10 years ago
0.0.5
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago