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 06e5faf

Browse filesBrowse files
evanlucasMyles Borins
authored andcommitted
test: add tests for console.assert
There were previously no tests where console.assert failed PR-URL: #6302 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 620a261 commit 06e5faf
Copy full SHA for 06e5faf

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-console.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-console.js
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,11 @@ assert.ok(/^__proto__: \d+ms$/.test(strings.shift().trim()));
7373
assert.ok(/^constructor: \d+ms$/.test(strings.shift().trim()));
7474
assert.ok(/^hasOwnProperty: \d+ms$/.test(strings.shift().trim()));
7575
assert.equal(strings.length, 0);
76+
77+
assert.throws(() => {
78+
console.assert(false, 'should throw');
79+
}, /should throw/);
80+
81+
assert.doesNotThrow(() => {
82+
console.assert(true, 'this should not throw');
83+
});

0 commit comments

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