mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Add _.flip test.
This commit is contained in:
17
test/test.js
17
test/test.js
@@ -4663,6 +4663,23 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
QUnit.module('lodash.flip');
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
function fn() {
|
||||||
|
return slice.call(arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
QUnit.test('should flip arguments provided to `func`', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
var flipped = _.flip(fn);
|
||||||
|
assert.deepEqual(flipped('a', 'b', 'c'), ['c', 'b', 'a']);
|
||||||
|
});
|
||||||
|
}());
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
QUnit.module('lodash.take');
|
QUnit.module('lodash.take');
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user