mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Make test.'s match var name usage in lodash.js.
Former-commit-id: 680581a0138315def67c213605140c74f7d6ee6a
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
var largeArraySize = 75;
|
var largeArraySize = 75;
|
||||||
|
|
||||||
/** Used to set property descriptors */
|
/** Used to set property descriptors */
|
||||||
var setDescriptor = (function() {
|
var defineProperty = (function() {
|
||||||
try {
|
try {
|
||||||
var o = {},
|
var o = {},
|
||||||
func = Object.defineProperty,
|
func = Object.defineProperty,
|
||||||
@@ -2350,9 +2350,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should handle object arguments with non-numeric length properties', function() {
|
test('should handle object arguments with non-numeric length properties', function() {
|
||||||
if (setDescriptor) {
|
if (defineProperty) {
|
||||||
var object = {};
|
var object = {};
|
||||||
setDescriptor(object, 'length', { 'value': 'x' });
|
defineProperty(object, 'length', { 'value': 'x' });
|
||||||
deepEqual(_.map(object, _.identity), []);
|
deepEqual(_.map(object, _.identity), []);
|
||||||
} else {
|
} else {
|
||||||
skipTest();
|
skipTest();
|
||||||
|
|||||||
Reference in New Issue
Block a user