Skip to content

Commit

Permalink
test: check complete error message
Browse files Browse the repository at this point in the history
In test-stream-writable-change-default-encoding, use a regular
expression to match the complete error message.

PR-URL: #14264
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
  • Loading branch information
fraserxu authored and MylesBorins committed Aug 16, 2017
1 parent b89e806 commit ed6d4f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ assert.throws(function changeDefaultEncodingToInvalidValue() {
m.setDefaultEncoding({});
m.write('bar');
m.end();
}, TypeError);
}, /^TypeError: Unknown encoding: \[object Object\]$/);

(function checkVairableCaseEncoding() {
const m = new MyWritable(function(isBuffer, type, enc) {
Expand Down

0 comments on commit ed6d4f0

Please sign in to comment.