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 33fe892

Browse filesBrowse files
cjihrigaddaleax
authored andcommitted
test: increase triggerReport() coverage
PR-URL: #26268 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent a382b52 commit 33fe892
Copy full SHA for 33fe892

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/node-report/test-api-nohooks.js‎

Copy file name to clipboardExpand all lines: test/node-report/test-api-nohooks.js
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,17 @@ function validate() {
6767
helper.validate(filename);
6868
fs.unlinkSync(filename);
6969
}
70+
71+
// Test with an invalid file argument.
72+
[null, 1, Symbol(), function() {}].forEach((file) => {
73+
common.expectsError(() => {
74+
process.report.triggerReport(file);
75+
}, { code: 'ERR_INVALID_ARG_TYPE' });
76+
});
77+
78+
// Test with an invalid error argument.
79+
[null, 1, Symbol(), function() {}, 'foo'].forEach((error) => {
80+
common.expectsError(() => {
81+
process.report.triggerReport('file', error);
82+
}, { code: 'ERR_INVALID_ARG_TYPE' });
83+
});

0 commit comments

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