Skip to content

Commit c25cccf

Browse files
himself65Trott
authored andcommitted
test: check getReport when error with one line stack
PR-URL: nodejs#28433 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 1c989c9 commit c25cccf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/report/test-report-getreport.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ common.expectWarning('ExperimentalWarning',
2121
assert.deepStrictEqual(helper.findReports(process.pid, process.cwd()), []);
2222
}
2323

24+
{
25+
// Test with an error with one line stack
26+
const error = new Error();
27+
error.stack = 'only one line';
28+
helper.validateContent(process.report.getReport(error));
29+
assert.deepStrictEqual(helper.findReports(process.pid, process.cwd()), []);
30+
}
31+
2432
// Test with an invalid error argument.
2533
[null, 1, Symbol(), function() {}, 'foo'].forEach((error) => {
2634
common.expectsError(() => {

0 commit comments

Comments
 (0)