Move getFuncName test.

This commit is contained in:
John-David Dalton
2016-01-15 22:57:35 -08:00
parent 6bc0aba800
commit c0a6f051fc

View File

@@ -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);
});
});
/*--------------------------------------------------------------------------*/