From e32e280cf18e8166ae43bf96b49e15b66b672790 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 22 Nov 2013 22:08:51 -0800 Subject: [PATCH] Update async `_.throttle` test. --- test/test.js | 9 ++++++--- test/underscore.html | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/test.js b/test/test.js index 97d005d56..ec7cfd0ae 100644 --- a/test/test.js +++ b/test/test.js @@ -7020,7 +7020,7 @@ } }); - test('should clear timeout when `func` is called', 1, function() { + asyncTest('should clear timeout when `func` is called', 1, function() { if (!isModularize) { var callCount = 0, dateCount = 0; @@ -7043,7 +7043,10 @@ throttled(); throttled(); - equal(callCount, 2); + setTimeout(function() { + equal(callCount, 2); + QUnit.start(); + }, 64); } else { skipTest(); @@ -8352,7 +8355,7 @@ /*--------------------------------------------------------------------------*/ - QUnit.config.asyncRetries = 5; + QUnit.config.asyncRetries = 10; if (!document) { QUnit.config.noglobals = true; diff --git a/test/underscore.html b/test/underscore.html index 267640dd2..fdfd871d4 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -25,7 +25,7 @@