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);