Skip to content

Commit a338b94

Browse files
Amunuaddaleax
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 c8087c0 commit a338b94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

0 commit comments

Comments
(0)