gulp-qunits
Run hybrid unit tests through QUnit in a headless PhantomJS instance, as well as directly in Node.js. Forked from gulp-qunit but developed as a separate project, for use in paper.js.
Install
Install with npm
$ npm install --save-dev gulp-qunits
Usage
PhantomJS QUnit Runner
var gulp = qunits = ; gulp;
With options:
var gulp = qunit = ; gulp;
Node.js QUnit Runner
var gulp = qunits = ; gulp;
With additional, optionally name-spaced requires:
var gulp = qunit = ; gulp;
API
qunits(options)
options.timeout
Type: Number
Default: 5
Pass a number or string value to override the default timeout of 5 seconds.
options.arguments
Type: Array
Default: undefined
The arguments to be passed on to forked process, e.g. PhantomJS. See the PhantomJS documentation for more information.
options.checkGlobals
Type: Boolean
Default: false
Causes QUnit to make a list of all properties in the global scope, before and after each test, and then checks for differences. If properties are added or removed, the test will fail, listing the difference. This helps to make sure your test code and code under test doesn't accidentally leak into the global scope. Currently this only works in the PhantomJS QUnit Runner.
License
MIT © Jürg Lehni