Add a non-deep property test for _.get.

This commit is contained in:
jdalton
2015-04-03 12:56:12 -05:00
parent c88589e0e5
commit 9749ff7c67

View File

@@ -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);