diff --git a/test/parallel/test-stream-writable-null.js b/test/parallel/test-stream-writable-null.js index 438f250a17dde6..b6c62727f6c946 100644 --- a/test/parallel/test-stream-writable-null.js +++ b/test/parallel/test-stream-writable-null.js @@ -32,7 +32,7 @@ assert.doesNotThrow(() => { assert.throws(() => { const m = new MyWritable(); m.write(false, (err) => assert.ok(err)); -}, TypeError, 'Invalid non-string/buffer chunk'); +}, /^TypeError: Invalid non-string\/buffer chunk$/); assert.doesNotThrow(() => { const m = new MyWritable().on('error', (e) => { assert.ok(e);