diff --git a/.travis.yml b/.travis.yml index 9e43fad6b..0fa03f1f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,8 +72,8 @@ script: - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/underscore.html?build=lodash-compat\"" - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/backbone.html?build=lodash-compat\"" - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/index.html?build=lodash-modern-dev\"" - - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/underscore.html?build=modern-dev\"" - - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/backbone.html?build=modern-dev\"" + - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/underscore.html?build=lodash-modern-dev\"" + - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/backbone.html?build=lodash-modern-dev\"" - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/index.html?build=lodash-modern\"" - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/underscore.html?build=lodash-modern\"" - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/backbone.html?build=lodash-modern\"" @@ -91,3 +91,7 @@ script: - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/index.html?build=lodash-mobile\"" - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/underscore.html?build=lodash-mobile\"" - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/backbone.html?build=lodash-mobile\"" + - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/underscore.html?build=../dist/lodash.underscore.js\"" + - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/underscore.html?build=lodash-underscore\"" + - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/backbone.html?build=../dist/lodash.underscore.js\"" + - "[ $SAUCELABS == false ] && true || node ./test/saucelabs.js \"test/backbone.html?build=lodash-underscore\"" diff --git a/test/backbone.html b/test/backbone.html index ab9725175..d5038bcf1 100644 --- a/test/backbone.html +++ b/test/backbone.html @@ -50,8 +50,9 @@ return; } if (skippedAsserts === true) { - test.expected = 0; + test.async = false; test.callback = _.noop; + test.expected = 0; return; } test.finish = _.wrap(test.finish, function(func) { diff --git a/test/saucelabs.js b/test/saucelabs.js index fd40bf651..6286ac514 100644 --- a/test/saucelabs.js +++ b/test/saucelabs.js @@ -29,6 +29,7 @@ }()); var runnerQuery = url.parse(runnerPathname, true).query, + isBackbone = /\bbackbone\b/i.test(runnerPathname), isMobile = /\bmobile\b/i.test(runnerQuery.build), isModern = /\bmodern\b/i.test(runnerQuery.build); @@ -59,7 +60,20 @@ ['Windows 7', 'internet explorer', '8'] ]; } - // test mobile & modern browsers + // platforms for backbone tests + if (isBackbone) { + platforms = platforms.filter(function(platform) { + var browser = platform[1], + version = +platform[2]; + + switch (browser) { + case 'firefox': return version >= 4; + case 'internet explorer': return version >= 8; + } + return true + }); + } + // platforms for mobile and modern builds if (isMobile || isModern) { platforms = platforms.filter(function(platform) { var browser = platform[1], diff --git a/test/underscore.html b/test/underscore.html index 67eb7d70f..7bad5e4f7 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -62,7 +62,8 @@ ], 'bindAll': [ 'throws an error for bindAll with no functions named' - ] + ], + 'throttle triggers trailing call when invoked repeatedly': true }, 'Objects': { 'keys': [ @@ -99,8 +100,9 @@ return; } if (skippedAsserts === true) { - test.expected = 0; + test.async = false; test.callback = _.noop; + test.expected = 0; return; } test.finish = _.wrap(test.finish, function(func) {