diff --git a/test/parallel/test-stream-writable-null.js b/test/parallel/test-stream-writable-null.js index 50ed1d286a48a3..0bb8aa7bbc1c10 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);