test: check writeReport when error with one line stack
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
7fa9abf6f2
commit
1c989c9f54
@ -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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user