mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
test: check control characters replacing
Add test that creates an error with a control character in the message. PR-URL: https://github.com/nodejs/node/pull/24182 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
07b7db2f81
commit
454ede2d90
1 file changed
+8
@@ -835,6 +835,14 @@ common.expectsError(
|
||||
);
|
||||
|
||||
{
|
||||
|
||||
assert.throws(() => {
|
||||
assert.ok((() => Boolean('' === false))());
|
||||
}, {
|
||||
message: 'The expression evaluated to a falsy value:\n\n' +
|
||||
" assert.ok((() => Boolean('\\u0001' === false))())\n"
|
||||
});
|
||||
|
||||
const errFn = () => {
|
||||
const err = new TypeError('Wrong value');
|
||||
err.code = 404;
|
||||
|
||||
Reference in new issue
Block a user