Fix object test

This commit is contained in:
Vincent Fiduccia 2019-10-28 02:25:38 -07:00
parent 434329b04a
commit d455f7eb1d
No known key found for this signature in database
GPG Key ID: 2B29AD6BB2BB2582
1 changed files with 2 additions and 2 deletions

View File

@ -6,8 +6,8 @@ const obj = { foo: 'bar', baz: { bat: 42 } };
test('get', (t) => {
t.deepEqual( get(obj, 'foo'), obj.foo, 'Gets single keys');
t.deepEqual( get(obj, 'baz.bat'), obj.baz.bat, 'Gets nested keys');
t.deepEqual( get(obj, 'baz.nonsense'), null, 'Returns null for a leaf ');
t.deepEqual( get(obj, 'non.sense'), null, 'Returns null for a parent ');
t.deepEqual( get(obj, 'baz.nonsense'), undefined, 'Returns undefined for nonexistent leaf ');
t.deepEqual( get(obj, 'non.sense'), undefined, 'Returns undefined for nonexistent parent ');
});
test('getter', (t) => {