Skip to content

Commit

Permalink
test: check writeReport when error with one line stack
Browse files Browse the repository at this point in the history
PR-URL: #28433
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
himself65 authored and targos committed Jul 20, 2019
1 parent 48c369b commit 793163e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/report/test-report-writereport.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ function validate() {
validate();
}

{
// Test with an error with one line stack
const error = new Error();
error.stack = 'only one line';
process.report.writeReport(error);
validate();
}

{
// Test with a file argument.
const file = process.report.writeReport('custom-name-1.json');
Expand Down

0 comments on commit 793163e

Please sign in to comment.