diff --git a/test/parallel/test-stream-inheritance.js b/test/parallel/test-stream-inheritance.js index 77dc4804c1f986..2c6daed0385d4a 100644 --- a/test/parallel/test-stream-inheritance.js +++ b/test/parallel/test-stream-inheritance.js @@ -33,8 +33,14 @@ assert.ok(!(undefined instanceof Writable)); // Simple inheritance check for `Writable` works fine in a subclass constructor. function CustomWritable() { - assert.ok(this instanceof Writable, 'inherits from Writable'); - assert.ok(this instanceof CustomWritable, 'inherits from CustomWritable'); + assert.ok( + this instanceof CustomWritable, + `${this} does not inherit from CustomWritable` + ); + assert.ok( + this instanceof Writable, + `${this} does not inherit from Writable` + ); } Object.setPrototypeOf(CustomWritable, Writable); @@ -42,4 +48,4 @@ Object.setPrototypeOf(CustomWritable.prototype, Writable.prototype); new CustomWritable(); -assert.throws(CustomWritable, /AssertionError: inherits from Writable/); +assert.throws(CustomWritable, /AssertionError: undefined does not inherit from CustomWritable/);