From 2e485b9ac5ea265f3e9a285f5dbfec7c864c8d55 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 5 Nov 2013 08:36:02 -0800 Subject: [PATCH] Tweak test filters for backbone and underscore. --- test/backbone.html | 1 + test/saucelabs.js | 2 +- test/underscore.html | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/test/backbone.html b/test/backbone.html index dccfe9c00..7e2f7f451 100644 --- a/test/backbone.html +++ b/test/backbone.html @@ -45,6 +45,7 @@ } }; + // only skip `Backbone.Router` tests in IE < 8 if (!(document.attachEvent && (document.documentMode || 0) < 8)) { delete skipped['Backbone.Router']; } diff --git a/test/saucelabs.js b/test/saucelabs.js index 97e2fba4e..9ca7ed70a 100644 --- a/test/saucelabs.js +++ b/test/saucelabs.js @@ -60,7 +60,7 @@ ['Windows 7', 'internet explorer', '8'] ]; } - // platforms for backbone tests + // platforms for Backbone tests if (isBackbone) { platforms = platforms.filter(function(platform) { var browser = platform[1], diff --git a/test/underscore.html b/test/underscore.html index 3309f1166..032b7b2bd 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -97,21 +97,33 @@ '_.unescape': [ '"Curly & Moe's"' ], - 'uniqueId': [ + 'times': [ 'Died on test #1' ], - 'times': [ + 'uniqueId': [ 'Died on test #1' ] } }; + // only skip in non-Underscore builds if (/\bunderscore\b/i.test(ui.buildPath)) { delete skipped.Chaining; delete skipped.Collections.where; delete skipped.Utility['_.escape']; delete skipped.Utility['_.unescape']; } + // only skip in Sauce Labs + if (location.port != '8081') { + for (var key in skipped.Functions) { + if (/\b(debounce|throttl)/.test(key)) { + delete skipped.Functions[key]; + } + } + delete skipped.Objects.isEqual; + delete skipped.Utility.times; + delete skipped.Utility.uniqueId; + } QUnit.testStart(function(details) { var test = QUnit.config.current,