Skip to content

Commit a168361

Browse files
fraserxuMylesBorins
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 1e40390 commit a168361

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
@@ -40,7 +40,7 @@ assert.throws(function changeDefaultEncodingToInvalidValue() {
4040
m.setDefaultEncoding({});
4141
m.write('bar');
4242
m.end();
43-
}, TypeError);
43+
}, /^TypeError: Unknown encoding: \[object Object\]$/);
4444

4545
(function checkVairableCaseEncoding() {
4646
const m = new MyWritable(function(isBuffer, type, enc) {

0 commit comments

Comments
 (0)