test: check complete error message
In test-stream-writable-change-default-encoding, use a regular expression to match the complete error message. PR-URL: https://github.com/nodejs/node/pull/14264 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com>
This commit is contained in:
parent
fb37922cf3
commit
35398af68e
@ -61,7 +61,7 @@ assert.throws(function changeDefaultEncodingToInvalidValue() {
|
|||||||
m.setDefaultEncoding({});
|
m.setDefaultEncoding({});
|
||||||
m.write('bar');
|
m.write('bar');
|
||||||
m.end();
|
m.end();
|
||||||
}, TypeError);
|
}, /^TypeError: Unknown encoding: \[object Object\]$/);
|
||||||
|
|
||||||
(function checkVairableCaseEncoding() {
|
(function checkVairableCaseEncoding() {
|
||||||
const m = new MyWritable(function(isBuffer, type, enc) {
|
const m = new MyWritable(function(isBuffer, type, enc) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user