test: check getReport 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
1c989c9f54
commit
c25cccf130
@ -21,6 +21,14 @@ common.expectWarning('ExperimentalWarning',
|
|||||||
assert.deepStrictEqual(helper.findReports(process.pid, process.cwd()), []);
|
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.
|
// Test with an invalid error argument.
|
||||||
[null, 1, Symbol(), function() {}, 'foo'].forEach((error) => {
|
[null, 1, Symbol(), function() {}, 'foo'].forEach((error) => {
|
||||||
common.expectsError(() => {
|
common.expectsError(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user