From a893d43d16634158cd06d80471d6b01fc7997503 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 28 May 2014 11:58:18 -0400 Subject: [PATCH] Move test error catching code before any other script files. --- test/backbone.html | 18 +++++++++++------- test/index.html | 18 +++++++++++------- test/underscore.html | 18 +++++++++++------- 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/test/backbone.html b/test/backbone.html index b603952c1..26c613972 100644 --- a/test/backbone.html +++ b/test/backbone.html @@ -12,6 +12,17 @@

Test

+ @@ -42,13 +53,6 @@ } }; - // 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(' @@ -154,13 +165,6 @@ QUnit.config.hidepassed = true; - // 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 and expose it to the bad extensions/shims if (!ui.isModularize) { addBizarroMethods(); diff --git a/test/underscore.html b/test/underscore.html index c9337d1c0..04db047cc 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -19,6 +19,17 @@ + @@ -128,13 +139,6 @@ } }; - // 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 }; - }; - } // only excuse in Sauce Labs (buggy Safari and timers) else { delete QUnit.config.excused.Chaining['select/reject/sortBy'];