Skip to content

iLanguage/gulp-nightwatch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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('')
    .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('')
    .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('')
    .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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%