grunt-saucelabs
grunt-saucelabs copied to clipboard
Improve error message when SAUCE_ACCESS_KEY or SAUCE_USERNAME is not set
When running saucelabs-mocha and SAUCE_ACCESS_KEY or SAUCE_USERNAME is not defined, the task fails without telling the user what is wrong:
$ grunt test
Running "connect:server" (connect) task
Started connect web server on 127.0.0.1:9999.
Running "saucelabs-mocha:all" (saucelabs-mocha) task
=> Connecting to Saucelabs ...
Warning: Task "saucelabs-mocha:all" failed. Use --force to continue.
Aborted due to warnings.
The task should print a helpful error message instead:
Running "saucelabs-mocha:all" (saucelabs-mocha) task
=> Connecting to Saucelabs ...
Authorization failed, make sure you have correctly
set SAUCE_USERNAME and SAUCE_ACCESS_KEY.