diff --git a/test/test.js b/test/test.js index 0e3878b04..ffdaa1836 100644 --- a/test/test.js +++ b/test/test.js @@ -2843,11 +2843,27 @@ }); setTimeout(function() { - strictEqual(withCount, 2); + equal(withCount, 2); strictEqual(withoutCount, 1); QUnit.start(); }, 64); }); + + asyncTest('should not update `lastCalled`, at the end of the timeout, when `trailing` is `false`', function() { + var count = 0; + + var throttled = _.throttle(function() { + count++; + }, 64, { 'trailing': false }); + + _.times(2, throttled); + setTimeout(function() { _.times(2, throttled); }, 100); + + setTimeout(function() { + equal(count, 2); + QUnit.start(); + }, 128); + }); }()); /*--------------------------------------------------------------------------*/