1
0
Fork 0

Added test to ensure correct instance is returned when returning 'this' from a parent method

closure/master
Mike Gerwitz 2011-03-10 12:24:59 -05:00
parent 7427958ec0
commit 84363aca45
1 changed files with 7 additions and 0 deletions

View File

@ -334,5 +334,12 @@ var common = require( './common' ),
foo,
"Returning 'this' from a method should return instance of self"
);
// what happens in the case of inheritance?
assert.deepEqual(
sub_foo.getSelf(),
sub_foo,
"Returning 'this' from a super method should return the subtype"
);
} )();