From 891ebb8ff6dce40a9f38f42865b3c55000fbf1fc Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 19 May 2014 09:08:15 -0700 Subject: [PATCH] Attempt to detect more false test errors. --- test/backbone.html | 7 +++++++ test/index.html | 11 +++++++++-- test/saucelabs.js | 23 ++++++++++++++--------- test/underscore.html | 9 ++++++++- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/test/backbone.html b/test/backbone.html index 95c12d7a8..b603952c1 100644 --- a/test/backbone.html +++ b/test/backbone.html @@ -42,6 +42,13 @@ } }; + // avoid reporting tests to Sauce Labs when script errors occur + if (ui.isSauceLabs) { + window.onerror = function(message) { + QUnit.config.done.length = 0; + global_test_results = { 'message': message }; + }; + } // load Lo-Dash if (!ui.isModularize) { document.write('