Skip to content

Commit

Permalink
test: use regular expression to match error msg
Browse files Browse the repository at this point in the history
PR-URL: #14265
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Amunu authored and addaleax committed Jul 18, 2017
1 parent c8087c0 commit a338b94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-stream-writable-null.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a338b94

Please sign in to comment.