Tweak test filters for backbone and underscore.

This commit is contained in:
John-David Dalton
2013-11-05 08:36:02 -08:00
parent b76aa926f6
commit 2e485b9ac5
3 changed files with 16 additions and 3 deletions

View File

@@ -45,6 +45,7 @@
} }
}; };
// only skip `Backbone.Router` tests in IE < 8
if (!(document.attachEvent && (document.documentMode || 0) < 8)) { if (!(document.attachEvent && (document.documentMode || 0) < 8)) {
delete skipped['Backbone.Router']; delete skipped['Backbone.Router'];
} }

View File

@@ -60,7 +60,7 @@
['Windows 7', 'internet explorer', '8'] ['Windows 7', 'internet explorer', '8']
]; ];
} }
// platforms for backbone tests // platforms for Backbone tests
if (isBackbone) { if (isBackbone) {
platforms = platforms.filter(function(platform) { platforms = platforms.filter(function(platform) {
var browser = platform[1], var browser = platform[1],

View File

@@ -97,21 +97,33 @@
'_.unescape': [ '_.unescape': [
'"<a href=\\"http://moe.com\\">Curly & Moe&#039;s</a>"' '"<a href=\\"http://moe.com\\">Curly & Moe&#039;s</a>"'
], ],
'uniqueId': [ 'times': [
'Died on test #1' 'Died on test #1'
], ],
'times': [ 'uniqueId': [
'Died on test #1' 'Died on test #1'
] ]
} }
}; };
// only skip in non-Underscore builds
if (/\bunderscore\b/i.test(ui.buildPath)) { if (/\bunderscore\b/i.test(ui.buildPath)) {
delete skipped.Chaining; delete skipped.Chaining;
delete skipped.Collections.where; delete skipped.Collections.where;
delete skipped.Utility['_.escape']; delete skipped.Utility['_.escape'];
delete skipped.Utility['_.unescape']; 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) { QUnit.testStart(function(details) {
var test = QUnit.config.current, var test = QUnit.config.current,