mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
lodash: Make deb ounce match throttle's return value behavior. [jddalton]
Former-commit-id: 2d4073c8a2ba20b98344c19cbfaf388a2683ef19
This commit is contained in:
13
test/test.js
13
test/test.js
@@ -99,6 +99,19 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.debounce');
|
||||
|
||||
(function() {
|
||||
test('subsequent "immediate" debounced calls should return the result of the first call', function() {
|
||||
var debounced = _.debounce(function(value) { return value; }, 100, true),
|
||||
result = [debounced('x'), debounced('y')];
|
||||
|
||||
deepEqual(result, ['x', 'x']);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.forEach');
|
||||
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user