Skip to content
This repository has been archived by the owner on Oct 24, 2021. It is now read-only.

david-martin/grunt-nightwatchjs

Repository files navigation

grunt-nightwatchjs

npm version Build Status

Grunt plugin for http://nightwatchjs.org/

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-nightwatchjs --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-nightwatchjs');

The "nightwatchjs" task

Overview

Add a nightwatch.json file to the root of your project, then run a nightwatch environment as follows:

grunt nightwatchjs:my_env

Currently the plugin depends on the nightwatch cli being available from ./node_modules/.bin/nightwatch, so your project will have to include nightwatch as a dependency in your package.json. This may change in time.

Nightwatchjs may have its own dependencies that need installing too (e.g. selenium jar). Best to check https://github.com/beatfactor/nightwatch.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.