Rename getValue to result.

This commit is contained in:
Brad Dunbar
2012-03-19 14:33:38 -04:00
parent d0e7b397c1
commit 5c7ccb21ef
3 changed files with 12 additions and 12 deletions

View File

@@ -165,13 +165,13 @@ $(document).ready(function() {
strictEqual(tmpl(), '<p>\u2028\u2028\u2029\u2029</p>');
});
test('getValue calls functions and returns primitives', function() {
test('result calls functions and returns primitives', function() {
var obj = {w: '', x: 'x', y: function(){ return 'y'; }};
strictEqual(_.getValue(obj, 'w'), '');
strictEqual(_.getValue(obj, 'x'), 'x');
strictEqual(_.getValue(obj, 'y'), 'y');
strictEqual(_.getValue(obj, 'z'), undefined);
strictEqual(_.getValue(null, 'x'), null);
strictEqual(_.result(obj, 'w'), '');
strictEqual(_.result(obj, 'x'), 'x');
strictEqual(_.result(obj, 'y'), 'y');
strictEqual(_.result(obj, 'z'), undefined);
strictEqual(_.result(null, 'x'), null);
});
});