Add a test for _.rearg used on already rearged functions.

This commit is contained in:
John-David Dalton
2014-11-13 23:12:57 -08:00
parent 5d4187bf03
commit 6418f78fdb

View File

@@ -9688,6 +9688,13 @@
var rearged = _.rearg(fn, [1, 0]);
deepEqual(rearged('b', 'a', 'c'), ['a', 'b', 'c']);
});
test('should work on functions that have been rearged', 1, function() {
var rearged1 = _.rearg(fn, 2, 1, 0),
rearged2 = _.rearg(rearged1, 1, 0, 2);
deepEqual(rearged2('b', 'c', 'a'), ['a', 'b', 'c']);
});
}());
/*--------------------------------------------------------------------------*/