Skip to content

Commit f805db3

Browse files
alegattiBridgeAR
authored andcommittedNov 13, 2018
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>
1 parent 75e4f7d commit f805db3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎test/parallel/test-assert.js

+8
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,14 @@ common.expectsError(
862862
});
863863

864864
{
865+
866+
assert.throws(() => {
867+
assert.ok((() => Boolean('' === false))());
868+
}, {
869+
message: 'The expression evaluated to a falsy value:\n\n' +
870+
" assert.ok((() => Boolean('\\u0001' === false))())\n"
871+
});
872+
865873
const errFn = () => {
866874
const err = new TypeError('Wrong value');
867875
err.code = 404;

0 commit comments

Comments
 (0)