Skip to content

Commit c44d899

Browse files
fraserxuaddaleax
authored andcommitted
test: check complete error message
In test-stream-writable-change-default-encoding, use a regular expression to match the complete error message. PR-URL: #14264 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Bryan English <[email protected]>
1 parent bf94572 commit c44d899

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-stream-writable-change-default-encoding.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ assert.throws(function changeDefaultEncodingToInvalidValue() {
6161
m.setDefaultEncoding({});
6262
m.write('bar');
6363
m.end();
64-
}, TypeError);
64+
}, /^TypeError: Unknown encoding: \[object Object\]$/);
6565

6666
(function checkVairableCaseEncoding() {
6767
const m = new MyWritable(function(isBuffer, type, enc) {

0 commit comments

Comments
 (0)