Skip to content

tatsuyafw/gulp-nightwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

gulp plugin for Nightwatch.js

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published