Skip to content

Commit

Permalink
test: check getReport when error with one line stack
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Jun 26, 2019
1 parent a8602c1 commit ad0b6e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/report/test-report-getreport.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ common.expectWarning('ExperimentalWarning',
assert.deepStrictEqual(helper.findReports(process.pid, process.cwd()), []);
}

{
// Test with an error with one line stack
const error = new Error();
error.stack = 'only one line';
helper.validateContent(process.report.getReport(error));
assert.deepStrictEqual(helper.findReports(process.pid, process.cwd()), []);
}

// Test with an invalid error argument.
[null, 1, Symbol(), function() {}, 'foo'].forEach((error) => {
common.expectsError(() => {
Expand Down

0 comments on commit ad0b6e3

Please sign in to comment.