Skip to content

Commit

Permalink
Merge 23ff98e into 190165f
Browse files Browse the repository at this point in the history
  • Loading branch information
hbenl authored Jul 9, 2024
2 parents 190165f + 23ff98e commit d1e1aad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-brooms-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@replayio/playwright": patch
---

Add a trailing log line in case another playwright reporter removes our last line
13 changes: 13 additions & 0 deletions packages/playwright/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,19 @@ export default class ReplayPlaywrightReporter implements Reporter {
console.warn(`[replay.io]: ${line}`);
});
}

// 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
//
// the issue is tracked here: https://github.com/microsoft/playwright/issues/23875
console.log("[replay.io]:");
} finally {
await Promise.all([mixpanelAPI.close().catch(noop), logger.close().catch(noop)]);
}
Expand Down

0 comments on commit d1e1aad

Please sign in to comment.