File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,19 @@ assert.ok(!(undefined instanceof Writable));
33
33
34
34
// Simple inheritance check for `Writable` works fine in a subclass constructor.
35
35
function CustomWritable ( ) {
36
- assert . ok ( this instanceof Writable , 'inherits from Writable' ) ;
37
- assert . ok ( this instanceof CustomWritable , 'inherits from CustomWritable' ) ;
36
+ assert . ok (
37
+ this instanceof CustomWritable ,
38
+ `${ this } does not inherit from CustomWritable`
39
+ ) ;
40
+ assert . ok (
41
+ this instanceof Writable ,
42
+ `${ this } does not inherit from Writable`
43
+ ) ;
38
44
}
39
45
40
46
Object . setPrototypeOf ( CustomWritable , Writable ) ;
41
47
Object . setPrototypeOf ( CustomWritable . prototype , Writable . prototype ) ;
42
48
43
49
new CustomWritable ( ) ;
44
50
45
- assert . throws ( CustomWritable , / A s s e r t i o n E r r o r : i n h e r i t s f r o m W r i t a b l e / ) ;
51
+ assert . throws ( CustomWritable , / A s s e r t i o n E r r o r : u n d e f i n e d d o e s n o t i n h e r i t f r o m C u s t o m W r i t a b l e / ) ;
You can’t perform that action at this time.
0 commit comments