From b309b507ebf24f60ec5ee835efae88a793fe7fb3 Mon Sep 17 00:00:00 2001 From: Chris Hiestand Date: Sun, 24 May 2015 23:31:44 -0700 Subject: [PATCH] Add tests for `parseFloat` issues with `isIndex` and `_.set`. --- test/test.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index fab7989ce..274616e8c 100644 --- a/test/test.js +++ b/test/test.js @@ -829,15 +829,16 @@ } }); - test('should return `false` for non-indexes', 4, function() { + test('should return `false` for non-indexes', 5, function() { if (func) { + strictEqual(func('1abc'), false); strictEqual(func(-1), false); strictEqual(func(3, 3), false); strictEqual(func(1.1), false); strictEqual(func(MAX_SAFE_INTEGER), false); } else { - skipTest(4); + skipTest(5); } }); }()); @@ -14190,6 +14191,13 @@ delete numberProto.a; }); + + test('should not create an array for missing non-index property names that start with numbers', 1, function() { + var object = {}; + + _.set(object, ['1a', '2b', '3c'], 1); + deepEqual(object, { '1a': { '2b': { '3c': 1 } } }); + }); }()); /*--------------------------------------------------------------------------*/