1.0.5 • Published 4 years ago

gulp-ngwt v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

gulp-ngwt NPM version Build Status Dependencies

A fork from tatsuyafw/gulp-nightwatch

Usage

First, install gulp-ngwt as a development dependency:

npm install --save-dev gulp-ngwt

Then, write your gulpfile.js as below.

var gulp = require('gulp'),
    nightwatch = require('gulp-ngwt');

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'
      }
    }));
});

You can abort Gulp execution when tests fail.

gulp.task('nightwatch:chrome', function(){
  return gulp.src('gulpfile.js')
    .pipe(nightwatch({
      configFile: 'test/nightwatch.json',
      abortOnFailure: true
    }));
});

API

nightwatch(options)

options

configFile

Type: String Default: nightwatch.json

The path to your Nightwatch config

cliArgs

Type: Array or Object Default: null

abortOnFailure

Type: Bool Default: False

Command line options for Nightwatch