★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/f805db3620Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files

test: check control characters replacing

Add test that creates an error with a control character in the message.

PR-URL: #24182
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
alegatti authored and BridgeAR committed Nov 6, 2018
1 parent 75e4f7d commit f805db362055e03c2b1fd2574b6dd707edfecd59
Showing with 8 additions and 0 deletions.
  1. +8 −0 test/parallel/test-assert.js
@@ -862,6 +862,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;

0 comments on commit f805db3

Please sign in to comment.
You can’t perform that action at this time.