From c604be31e0dbc07ecd2b40c347ccfc6816a7431c Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 9 Sep 2015 08:31:28 -0700 Subject: [PATCH] Add `_.flip` test. --- test/test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/test.js b/test/test.js index 96fcd8ee5..496e4a772 100644 --- a/test/test.js +++ b/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'); (function() {