Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 454ede2

Browse filesBrowse files
alegatticodebytere
authored andcommitted
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 07b7db2 commit 454ede2
Copy full SHA for 454ede2

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-assert.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-assert.js
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,14 @@ common.expectsError(
835835
);
836836

837837
{
838+
839+
assert.throws(() => {
840+
assert.ok((() => Boolean('' === false))());
841+
}, {
842+
message: 'The expression evaluated to a falsy value:\n\n' +
843+
" assert.ok((() => Boolean('\\u0001' === false))())\n"
844+
});
845+
838846
const errFn = () => {
839847
const err = new TypeError('Wrong value');
840848
err.code = 404;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.