@samitouri / QOS-React-2 / commits / 4daeda1490

log individual test results when in --debug mode

Thomas Aylott committed Nov 11, 2013 at 15:13 UTC 4daeda1490bd12b64f1bb7a9bae017f957adb89f
2 files changed +16
grunt/config/webdriver-jasmine.js
+2
@@ -16,6 +16,8 @@ exports.local = {
16 }
17 }
18
19 +if (grunt.option('debug')) exports.local.url += '?debug=' + grunt.option('debug');
20 +
21
22 exports.saucelabs = {
23 webdriver: {
test/lib/reportTestResults.browser.js
+14
@@ -1,5 +1,19 @@
1 +console._log = console.log;
2 +console.log = function(message){
3 + console._log(message);
4 + postDataToURL({type:'log', message:message}, '/reportTestResults');
5 +}
6 +console._error = console.error;
7 +console.error = function(message){
8 + console._error(message);
9 + postDataToURL({type:'error', message:message}, '/reportTestResults');
10 +}
11 +
12 ;(function(env){
13 env.addReporter(new jasmine.JSReporter());
14 + if (location.search.substring(1).indexOf('debug') != -1){
15 + env.addReporter(new TAPReporter(console.log.bind(console)));
16 + }
17
18 function report(){
19 if (typeof jasmine.getJSReport != 'function') {