Skip to content

Commit a8602c1

Browse files
committed
test: check writeReport when error with one line stack
1 parent 9e2763d commit a8602c1

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)