From c0a6f051fcc5a49820e36f41539e1927bbc2d7b4 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 15 Jan 2016 22:57:35 -0800 Subject: [PATCH] Move `getFuncName` test. --- test/test.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/test.js b/test/test.js index 6ed4e3857..04ae0a565 100644 --- a/test/test.js +++ b/test/test.js @@ -3474,18 +3474,6 @@ assert.deepEqual(c(3), expected); assert.deepEqual(d(), expected); }); - - QUnit.test('should work when a function name matches function name on Object.prototype', function(assert) { - assert.expect(1); - - var curried = _.curry(function hasOwnProperty(a, b, c) { - return [a, b, c]; - }); - - var expected = [1, 2, 3]; - - assert.deepEqual(curried(1)(2)(3), expected); - }); }()); /*--------------------------------------------------------------------------*/ @@ -3663,6 +3651,18 @@ assert.deepEqual(actual, expected); }); }); + + QUnit.test('`_.' + methodName + '` should work for function names that shadow those on `Object.prototype`', function(assert) { + assert.expect(1); + + var curried = _.curry(function hasOwnProperty(a, b, c) { + return [a, b, c]; + }); + + var expected = [1, 2, 3]; + + assert.deepEqual(curried(1)(2)(3), expected); + }); }); /*--------------------------------------------------------------------------*/