From e6acc10bfc957434ebc67e8475845cccca4dfc1a Mon Sep 17 00:00:00 2001 From: Holger Benl Date: Tue, 9 Jul 2024 13:49:12 +0200 Subject: [PATCH] Update packages/playwright/src/reporter.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mateusz BurzyƄski --- packages/playwright/src/reporter.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/playwright/src/reporter.ts b/packages/playwright/src/reporter.ts index 4936a83f..6157d8ba 100644 --- a/packages/playwright/src/reporter.ts +++ b/packages/playwright/src/reporter.ts @@ -404,6 +404,15 @@ export default class ReplayPlaywrightReporter implements Reporter { }); } + // we need to output an extra line that is safe to be deleted + // Playwright's line reporter removes the last line here: + // https://github.com/microsoft/playwright/blob/0c11d6ed803db582a5508c70f89e55dc9a36c751/packages/playwright/src/reporters/line.ts#L91 + // + // so if the user configured their reporters like this: + // + // reporters: [replayReporter({ upload: true }), ['line']] + // + // that can lead to removing *our* last log line console.log("[replay.io]:"); } finally { await Promise.all([mixpanelAPI.close().catch(noop), logger.close().catch(noop)]);