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 5d68e4b

Browse filesBrowse files
Trottcjihrig
authored andcommitted
test: console constructor missing new keyword
The `console.Console()` constructor function handles a missing `new` keyword. This code is not exercised in the current tests. Add a test for this. PR-URL: #8003 Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: JacksonTian - Jackson Tian <shvyo1987@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 97934f9 commit 5d68e4b
Copy full SHA for 5d68e4b

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-console-instance.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-console-instance.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,8 @@ out.write = function(d) {
6464
};
6565
[1, 2, 3].forEach(c.log);
6666
assert.equal(3, called);
67+
68+
// Console() detects if it is called without `new` keyword
69+
assert.doesNotThrow(function() {
70+
Console(out, err);
71+
});

0 commit comments

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