gulp-nightwatch
v1.2.0
Published
gulp plugin for Nightwatch.js
Downloads
551
Readme
gulp-nightwatch
Usage
First, install gulp-nightwatch
as a development dependency:
npm install --save-dev gulp-nightwatch
Then, write your gulpfile.js as below.
var gulp = require('gulp'),
nightwatch = require('gulp-nightwatch');
gulp.task('default', function() {
return gulp.src('gulpfile.js')
.pipe(nightwatch({
configFile: 'test/nightwatch.json'
}));
});
You can pass command line options to Nightwatch as an array by using the option cliArgs
.
gulp.task('nightwatch:chrome', function(){
return gulp.src('gulpfile.js')
.pipe(nightwatch({
configFile: 'test/nightwatch.json',
cliArgs: [ '--env chrome', '--tag sandbox' ]
}));
});
You may use an object instead, if you prefer.
gulp.task('nightwatch:chrome', function(){
return gulp.src('gulpfile.js')
.pipe(nightwatch({
configFile: 'test/nightwatch.json',
cliArgs: {
env: 'chrome',
tag: 'sandbox'
}
}));
});
API
nightwatch(options)
options
configFile
Type: String
Default: nightwatch.json
The path to your Nightwatch config
cliArgs
Type: Array
or Object
Default: null
Command line options for Nightwatch