Change name to user in docs and tests to avoid this.name.

This commit is contained in:
John-David Dalton
2014-09-05 09:01:29 -07:00
parent 56666c4bf4
commit fc018691e5
2 changed files with 217 additions and 223 deletions

View File

@@ -1247,9 +1247,9 @@
(function() {
test('should work when the target function is overwritten', 2, function() {
var object = {
'name': 'fred',
'user': 'fred',
'greet': function(greeting) {
return this.name + ' says: ' + greeting;
return this.user + ' says: ' + greeting;
}
};
@@ -1257,7 +1257,7 @@
strictEqual(bound(), 'fred says: hi');
object.greet = function(greeting) {
return this.name + ' says: ' + greeting + '!';
return this.user + ' says: ' + greeting + '!';
};
strictEqual(bound(), 'fred says: hi!');