From cb92035ba7ce122403436fcc1017e52674d75357 Mon Sep 17 00:00:00 2001 From: Flandre Date: Sun, 16 Jul 2017 15:15:00 +0800 Subject: [PATCH] test: use regular expression to match error msg PR-URL: https://github.com/nodejs/node/pull/14265 Reviewed-By: Rich Trott Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig --- 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);