Skip to content

Commit 8b945e7

Browse files
AmunuMylesBorins
authored andcommitted
test: use regular expression to match error msg
PR-URL: #14265 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent a168361 commit 8b945e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-stream-writable-null.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ MyWritable.prototype._write = function(chunk, encoding, callback) {
1919
assert.throws(() => {
2020
const m = new MyWritable({objectMode: true});
2121
m.write(null, (err) => assert.ok(err));
22-
}, TypeError, 'May not write null values to stream');
22+
}, /^TypeError: May not write null values to stream$/);
2323
assert.doesNotThrow(() => {
2424
const m = new MyWritable({objectMode: true}).on('error', (e) => {
2525
assert.ok(e);

0 commit comments

Comments
 (0)