From 793163e353efe0601e358ca0f3c3046e72eced56 Mon Sep 17 00:00:00 2001 From: himself65 Date: Wed, 26 Jun 2019 22:46:36 +0800 Subject: [PATCH] test: check writeReport when error with one line stack PR-URL: https://github.com/nodejs/node/pull/28433 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater --- test/report/test-report-writereport.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/report/test-report-writereport.js b/test/report/test-report-writereport.js index 8a22600acfbec4..5ab3af0e299eee 100644 --- a/test/report/test-report-writereport.js +++ b/test/report/test-report-writereport.js @@ -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');