gulp-ngwt

1.0.5 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i gulp-ngwt

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

7.77 kB

Total Files

6

Last publish

Collaborators

  • dgateles