From d9ddd2f2e30bc0f5998f19ec9b813d1a7384e3d9 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Tue, 7 Apr 2020 13:28:04 +0800 Subject: [PATCH] report: fix stderr matching for fatal error --- test/report/test-report-fatal-error.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/report/test-report-fatal-error.js b/test/report/test-report-fatal-error.js index 72576b40bd4384..c166c4b86c384f 100644 --- a/test/report/test-report-fatal-error.js +++ b/test/report/test-report-fatal-error.js @@ -113,8 +113,8 @@ const ARGS = [ assert.strictEqual(reports.length, 0); const lines = child.stderr.split('\n'); - // Skip over unavoidable free-form output from V8. - const report = lines[1]; + // Skip over unavoidable free-form output and gc log from V8. + const report = lines.find((i) => i.startsWith('{')); const json = JSON.parse(report); assert.strictEqual(json.header.threadId, null);