Skip to content

Commit 793163e

Browse files
himself65targos
authored andcommitted
test: check writeReport when error with one line stack
PR-URL: #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 48c369b commit 793163e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/report/test-report-writereport.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ function validate() {
3737
validate();
3838
}
3939

40+
{
41+
// Test with an error with one line stack
42+
const error = new Error();
43+
error.stack = 'only one line';
44+
process.report.writeReport(error);
45+
validate();
46+
}
47+
4048
{
4149
// Test with a file argument.
4250
const file = process.report.writeReport('custom-name-1.json');

0 commit comments

Comments
 (0)