Skip to content

Commit

Permalink
Make RECORD_REPLAY_ENABLE_ASSERTS environment forwardable to the br…
Browse files Browse the repository at this point in the history
…owser process (#501)
  • Loading branch information
Andarist authored May 29, 2024
1 parent 1740c99 commit e7c637c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/pink-mayflies-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@replayio/playwright": patch
"@replayio/cypress": patch
---

Make `RECORD_REPLAY_ENABLE_ASSERTS` environment forwardable to the browser process
1 change: 1 addition & 0 deletions packages/cypress/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ function onBeforeBrowserLaunch(
RECORD_REPLAY_DRIVER: noRecord && browser.family === "chromium" ? __filename : undefined,
RECORD_ALL_CONTENT: noRecord ? undefined : "1",
RECORD_REPLAY_METADATA_FILE: initMetadataFile(getMetadataFilePath()),
RECORD_REPLAY_ENABLE_ASSERTS: process.env.RECORD_REPLAY_ENABLE_ASSERTS,
...diagnosticConfig.env,
};

Expand Down
1 change: 1 addition & 0 deletions packages/playwright/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function getDeviceConfig() {
const env: Record<string, any> = {
...process.env,
RECORD_ALL_CONTENT: 1,
RECORD_REPLAY_ENABLE_ASSERTS: process.env.RECORD_REPLAY_ENABLE_ASSERTS,
};

if (process.env.RECORD_REPLAY_NO_RECORD) {
Expand Down

0 comments on commit e7c637c

Please sign in to comment.