Added test to ensure correct instance is returned when returning 'this' from a parent method
parent
7427958ec0
commit
84363aca45
|
@ -334,5 +334,12 @@ var common = require( './common' ),
|
||||||
foo,
|
foo,
|
||||||
"Returning 'this' from a method should return instance of self"
|
"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"
|
||||||
|
);
|
||||||
} )();
|
} )();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue