mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Add a non-deep property test for _.get.
This commit is contained in:
@@ -5998,6 +5998,11 @@
|
||||
QUnit.module('lodash.get');
|
||||
|
||||
(function() {
|
||||
test('should get property values', 1, function() {
|
||||
var object = { 'a': 'b' };
|
||||
strictEqual(_.get(object, 'a'), 'b');
|
||||
});
|
||||
|
||||
test('should get deep property values', 1, function() {
|
||||
var object = { 'a': { 'b': { 'c': 3 } } };
|
||||
strictEqual(_.get(object, 'a.b.c'), 3);
|
||||
|
||||
Reference in New Issue
Block a user