From a22789592218b7de0aee3ee8f3c644a2cdb97c0d Mon Sep 17 00:00:00 2001 From: Flandre Date: Sun, 16 Jul 2017 15:15:00 +0800 Subject: [PATCH] test: use regular match error message --- test/parallel/test-stream-writable-null.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-stream-writable-null.js b/test/parallel/test-stream-writable-null.js index 438f250a17dde6..50ed1d286a48a3 100644 --- a/test/parallel/test-stream-writable-null.js +++ b/test/parallel/test-stream-writable-null.js @@ -19,7 +19,7 @@ MyWritable.prototype._write = function(chunk, encoding, callback) { assert.throws(() => { const m = new MyWritable({objectMode: true}); m.write(null, (err) => assert.ok(err)); -}, TypeError, 'May not write null values to stream'); +}, /^TypeError: May not write null values to stream$/); assert.doesNotThrow(() => { const m = new MyWritable({objectMode: true}).on('error', (e) => { assert.ok(e);