Skip to content

Commit

Permalink
Update packages/playwright/src/reporter.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Mateusz Burzyński <[email protected]>
  • Loading branch information
hbenl and Andarist authored Jul 9, 2024
1 parent 1570205 commit e6acc10
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/playwright/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)]);
Expand Down

0 comments on commit e6acc10

Please sign in to comment.