Ensure _.result calls deep function with correct context.

This commit is contained in:
Justin Ridgewell
2015-03-28 23:56:37 -04:00
committed by jdalton
parent c594bda77f
commit 11ab3034b1
2 changed files with 13 additions and 1 deletions

View File

@@ -12497,6 +12497,14 @@
var actual = _.result(object, 'd', object.c);
strictEqual(actual, 1);
});
test('should call deep property method with correct context', 1, function() {
var value = {
'deep': object
};
strictEqual(_.result(value, ['deep', 'c']), 1);
})
}());
/*--------------------------------------------------------------------------*/