grunt-contrib-qunit
Advanced tools
Comparing version 1.3.0 to 2.0.0
{ | ||
"name": "grunt-contrib-qunit", | ||
"description": "Run QUnit unit tests in a headless PhantomJS instance", | ||
"version": "1.3.0", | ||
"version": "2.0.0", | ||
"author": { | ||
@@ -28,3 +28,3 @@ "name": "Grunt Team", | ||
"grunt-shell": "^1.3.0", | ||
"qunitjs": "^1.20.0" | ||
"qunitjs": "^2.3.0" | ||
}, | ||
@@ -31,0 +31,0 @@ "keywords": [ |
@@ -21,4 +21,2 @@ /* | ||
QUnit.config.reorder = false; | ||
// Run tests serially, not in parallel. | ||
QUnit.config.autorun = false; | ||
@@ -37,13 +35,8 @@ // Send messages to the parent PhantomJS process via alert! Good times!! | ||
// Parse some stuff before sending it. | ||
var actual, expected, dump; | ||
var actual, expected; | ||
if (!obj.result) { | ||
// In order to maintain backwards compatibility with `QUnit <1.15.0` | ||
// Older versions of QUnit (`<1.15.0`) use `QUnit.jsDump`, but this poperty was | ||
// deprecated and moved to `QUnit.dump` and will be removed in `QUnit 2.0`. | ||
dump = QUnit.dump || QUnit.jsDump; | ||
// Dumping large objects can be very slow, and the dump isn't used for | ||
// passing tests, so only dump if the test failed. | ||
actual = dump.parse(obj.actual); | ||
expected = dump.parse(obj.expected); | ||
actual = QUnit.dump.parse(obj.actual); | ||
expected = QUnit.dump.parse(obj.expected); | ||
} | ||
@@ -77,2 +70,2 @@ // Send it. | ||
}); | ||
})); | ||
})); |
@@ -1,2 +0,2 @@ | ||
# grunt-contrib-qunit v1.3.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-qunit.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-qunit) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/3vd43779joyj6qji/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-qunit/branch/master) | ||
# grunt-contrib-qunit v2.0.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-qunit.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-qunit) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/3vd43779joyj6qji/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-qunit/branch/master) | ||
@@ -27,6 +27,28 @@ > Run QUnit unit tests in a headless PhantomJS instance | ||
Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide. | ||
You have chosen to write your unit tests using [QUnit][], you have written a | ||
html page which reports the summary and indivudual details of your unit | ||
tests, you are happy with this but realize you miss the ability to have your | ||
unit test suite run automatically each time you commit changes to your | ||
code. | ||
When installed by npm, this plugin will automatically download and install [PhantomJS][] locally via the [grunt-lib-phantomjs][] library. | ||
This is where the `grunt-contrib-qunit` plugin comes in the play: | ||
`grunt-contrib-qunit` lets you run your tests in the invisible [PhantomJS][] | ||
browser, thus converting your unit test suite into something you can run | ||
from a script, a script you can have automatically run on travis-ci (or the | ||
Continuous Integration service of your choice) which in turn can alert you | ||
of any rule-breaking commit to your code. | ||
You can still monitor the status of your unit tests suite visiting your html | ||
test page in your browser, but with `grunt-contrib-qunit` you can also run | ||
the same suite from the command line interface. | ||
This plugin defines one single task: `qunit`. Configure it in your `Gruntfile.js`, run it with the `grunt qunit` command. | ||
Please read about specifying task targets, files and options in the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide. | ||
When installed by npm, this plugin will automatically download and install | ||
[PhantomJS][] locally via the [grunt-lib-phantomjs][] library. If your | ||
system already provides the PhantomJS program, this plugin will use the | ||
globally installed program. | ||
[PhantomJS]: http://www.phantomjs.org/ | ||
@@ -57,10 +79,13 @@ [grunt-lib-phantomjs]: https://github.com/gruntjs/grunt-lib-phantomjs | ||
#### inject | ||
Type: `String` | ||
Default: (built-in) | ||
Type: `String`|`Array` | ||
Default: `phantomjs/bridge.js` | ||
Path to an alternate QUnit-PhantomJS bridge file to be injected. See [the built-in bridge](https://github.com/gruntjs/grunt-contrib-qunit/blob/master/phantomjs/bridge.js) for more information. | ||
One or multiple (array) JavaScript file names to inject into the html test page. Defaults to the path of the QUnit-PhantomJS bridge file. | ||
You may want to inject something different than the provided QUnit-PhantomJS bridge, or to inject more than just the provided bridge. | ||
See [the built-in bridge](https://github.com/gruntjs/grunt-contrib-qunit/blob/master/phantomjs/bridge.js) for more information. | ||
#### httpBase | ||
Type: `String` | ||
Default: `false` | ||
Type: `String` | ||
Default: `""` | ||
@@ -70,3 +95,3 @@ Create URLs for the `src` files, all `src` files are prefixed with that base. | ||
#### console | ||
Type: `boolean` | ||
Type: `boolean` | ||
Default: `true` | ||
@@ -250,2 +275,3 @@ | ||
* 2017-04-04 v2.0.0 Remove usage of `QUnit.jsDump` Upgrade qunitjs to 2.3.0 (#123) adding an Introduction to the README (#140) | ||
* 2017-02-07 v1.3.0 Add ability to run tests in seeded-random order through `--seed` flag Add note about min version of QUnit required to use the CLI flags Implement support for todo tests and revamp reporting logic (#137) | ||
@@ -275,2 +301,2 @@ * 2016-04-14 v1.2.0 Add support for filtering running modules using command line (--modules) Removed 'grunt.warn' output from `error.onError` handler, onus now on end user binding to event. Update docs. | ||
*This file was generated on Tue Feb 07 2017 10:51:07.* | ||
*This file was generated on Tue Apr 04 2017 22:09:26.* |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29585
298
373