From ca5f7cb41d681e683870ec10bf6759cea534fe2b Mon Sep 17 00:00:00 2001 From: Jonah Stiennon Date: Fri, 30 May 2014 14:34:17 -0700 Subject: [PATCH] v8.0.0 --- README.md | 7 ++++++- package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c5e78d..e1cc005 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Full list of parameters which can be added to a saucelabs-* task: * __throttled__: Maximum number of unit test pages which will be sent to Sauce Labs concurrently. The maximum number of jobs you may have outstanding is this times the number of browsers, can be used to mitigate concurrency failures if you have a lot of unit test pages. _Optional_ * __max-duration__: Maximum duration of a test, this is actually a Selenium Capability. Sauce Labs defaults to 180 seconds for js unit tests. _Optional_ * __browsers__: An array of objects representing the [various browsers](https://saucelabs.com/docs/platforms) on which this test should run. _Optional_ -* __onTestComplete__ : A callback that is called every time a unit test for a page is complete. Runs per page, per browser configuration. Receives a 'result' argument which is the javascript object exposed to sauce labs. A true or false return value passes or fails the test, undefined return value does not alter the result of the test. For async results, call `this.async()` in the function. The return of `this.async()` is a function that should be called once the async action is completed. _Optional_ +* __onTestComplete__ : A callback that is called every time a unit test for a page is complete. Runs per page, per browser configuration. Receives two arguments `(result, callback)`. `result` is the javascript object exposed to sauce labs as the results of the test. `callback` must be called, node-style (having arguments `err`, `result` where result is a true/false boolean which sets the test result reported to the command line) _Optional_ A typical `test` task running from Grunt could look like `grunt.registerTask('test', ['server', 'qunit', 'saucelabs-qunit']);` This starts a server and then runs the QUnit tests first on PhantomJS and then using the Sauce Labs browsers. @@ -211,6 +211,11 @@ The [IndexedDBShim](http://github.com/axemclion/IndexedDBShim) is a project that Changelog --------- +####8.0.0#### +* Major refactor, thanks to all the work done by @gvas +* async `onTestComplete` callback fixed. Now the callback is passed two args: result, callback. `callback` is a node style callback (err, result); +* `/examples` directory added, while the actual tests and Gruntfile are now more complicated (and useful) + ####7.0.0#### * `throttled` parameter now represents the max number of jobs sent concurrently. Previously was `throttled * browsers.length` diff --git a/package.json b/package.json index 3a9630c..054d435 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-saucelabs", "description": "Grunt task running tests using Sauce Labs. Supports QUnit, Jasmine, Mocha and YUI tests", - "version": "7.0.0", + "version": "8.0.0", "homepage": "https://github.com/axemclion/grunt-saucelabs", "author": { "name": "Parashuram",