gulp-nightwatch

1.2.0 • Public • Published

gulp-nightwatch NPM version Build Status

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

Readme

Keywords

Package Sidebar

Install

npm i gulp-nightwatch

Weekly Downloads

350

Version

1.2.0

License

MIT

Unpacked Size

6.85 kB

Total Files

6

Last publish

Collaborators

  • tatsuyafw