axemclion/grunt-saucelabs — pull request #31 by Krinkle (2013-03-28 03:11:43+00:00)
Title: Refactor QUnit handling; Use grunt.log/grunt.verbose; JSHint

Lint:
* Move jshint options into separate .jshintrc file so that
editors with jshint support will pick it up for real-time
inline validation.
* Fixed spacing in Gruntfile (some of the browser properties
were indented with spaces instead of tabs).
* Include bin/ and test/qunit/grunt-saucelabs.js.

Grunt:
* Rename _browsers to browsers.
* Set detailedError to true for QUnit. The detailed output
is a more readable and less overwhelming than it used to be.
I'd say its in a state where I woulnd't know why you wouldn't
want to turn it on (perhaps remove the option later).
* Per comment on ab09ae8984, don't run 'npm-publish' by default
from 'npm test' or 'grunt'. Instead created a task group called
'release' which does test + publish. The default is to do test.
* Change qunit urls from main+logs to main+async because the logs
test suite of QUnit apparently broken (in normal browsers as well).

Package:
* Removed internal properties that aren't supposed to be
committed to the repository.

Task:
* Added explicit require for 'colors' module.
* Use grunt.log.error, grunt.log.ok and grunt.verbose instead of
console.log. This way users can choose whether they want all
that stuff from Sauce-Connect.jar and other verbose debugging
messages.
To enable the verbose output, set the '--verbose' flag in grunt.
http://gruntjs.com/api/grunt.log
* Consistently added [cfg.name] and [Sauce Labs Tunnel] in front
of each message where appropiate.
* Changed cfg.name to be browser/version/platform instead of
browser/platform/version. And fixed the bug where it put' two
slashes in the middle if one of the properties is absent.
* Start retryCount at 1 ("attempt 1, attempt 2, ...")

Task/QUnit:
* Implement a simple reporter plugin for QUnit that aggregates
the test results via callbacks instead of using the textContent
of the entire page as the test result (fixes #21).
* In showDetailedError, use this object instead of the textContent.
And, since it is JSON, iterate through and reduce it to only
the errors (fixes #29).
* Extract the report.name regardless of showDetailedError so that
one can distinguish between different test suites.
Previously it would output "[cfg.name] Tests ran result" multiple
times for the same browser if there are multiple urls.
Now it outputs: "[cfg.name] report.name: Success".

Test/QUnit:
* Update qunit JS and HTML files to their latest upstream versions.
Specifically jquery/qunit@4817861c02 and jquery/qunit@8328122ff9.
* Removed local hack which is no longer needed now that we have
grunt-saucelabs-inject.js.
* Removed unused files.

----

This is the result of a fix-everything-that-I-need sprint. I should've done this in separate commits, and if/when I find the time and you want me to, I'll definitely split this up.