grunt-contrib-qunit
Advanced tools
Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "grunt-contrib-qunit", | ||
"description": "Run QUnit unit tests in a headless PhantomJS instance", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Grunt Team", |
@@ -1,2 +0,2 @@ | ||
# grunt-contrib-qunit v0.7.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 v1.1.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) | ||
@@ -8,3 +8,2 @@ > Run QUnit unit tests in a headless PhantomJS instance | ||
## Getting Started | ||
This plugin requires Grunt `>=0.4.0` | ||
@@ -33,3 +32,3 @@ If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: | ||
[PhantomJS]: http://phantomjs.org/ | ||
[PhantomJS]: http://www.phantomjs.org/ | ||
[grunt-lib-phantomjs]: https://github.com/gruntjs/grunt-lib-phantomjs | ||
@@ -88,2 +87,8 @@ | ||
#### summaryOnly | ||
Type: `boolean` | ||
Default: `false` | ||
When true, this will suppress the default logging for individually failed tests. Customized logging can be performed by listening to and responding to `qunit.log` events. | ||
#### (-- PhantomJS arguments) | ||
@@ -229,3 +234,5 @@ Type: `String` | ||
* 2016-02-05 v1.0.0 Update grunt-lib-phantomjs to 1.0.0, effectively upgrading to phantomjs 2.x. Remove grunt as a peerDependency. | ||
* 2016-03-11 v1.1.0 Adding support for 'summaryOnly'. Fix options.force. Fix query string for noGlobals. update docs. | ||
* 2016-02-05 v1.0.1 Change `QUnit.jsDump` to `QUnit.dump`. | ||
* 2016-02-05 v1.0.0 Update grunt-lib-phantomjs to 1.0.0, effectively upgrading to phantomjs 2.x. Remove grunt as a peerDependency | ||
* 2015-04-03 v0.7.0 Log PhantomJS errors as warnings | ||
@@ -250,2 +257,2 @@ * 2015-03-31 v0.6.0 Add noGlobals option, forwarded to QUnit. Report proper exit code to grunt based on failures. Add support for AMD. | ||
*This file was generated on Fri Apr 03 2015 11:53:16.* | ||
*This file was generated on Fri Mar 11 2016 16:01:19.* |
@@ -46,2 +46,7 @@ /* | ||
var assertion; | ||
if (options && options.summaryOnly) { | ||
return; | ||
} | ||
// Print each assertion error. | ||
@@ -140,3 +145,5 @@ while (assertion = failedAssertions.shift()) { | ||
grunt.event.emit('qunit.fail.timeout'); | ||
grunt.log.error('PhantomJS timed out, possibly due to a missing QUnit start() call.'); | ||
grunt.log.error('PhantomJS timed out, possibly due to:\n' + | ||
'- QUnit is not loaded correctly.\n- A missing QUnit start() call.\n' + | ||
'- Or, a misconfiguration of this task.'); | ||
status.failed += 1; | ||
@@ -164,3 +171,4 @@ status.total += 1; | ||
// Do not use an HTTP base by default | ||
httpBase: false | ||
httpBase: false, | ||
summaryOnly: false | ||
}); | ||
@@ -187,3 +195,3 @@ | ||
parsed = url.parse(testUrl, true); | ||
parsed.query.noglobals = ""; | ||
parsed.query.noglobals = "true"; | ||
delete parsed.search; | ||
@@ -231,2 +239,4 @@ return url.format(parsed); | ||
function() { | ||
var success; | ||
// Log results. | ||
@@ -242,4 +252,11 @@ if (status.failed > 0) { | ||
} | ||
if (options && options.force) { | ||
success = true; | ||
} else { | ||
success = status.failed === 0; | ||
} | ||
// All done! | ||
done(status.failed === 0); | ||
done(success); | ||
}); | ||
@@ -246,0 +263,0 @@ }); |
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
24014
286
254