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 <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Amunu authored and MylesBorins committed Aug 16, 2017
1 parent 2014c7f commit 8b27a82
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 8b27a82

Please sign in to comment.