Skip to content

Commit

Permalink
Add env varible to disable cypress integration (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjduffy authored Aug 15, 2023
1 parent bea163a commit 7946601
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/cypress/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ function onReplayTask(value: any) {
}

const plugin: Cypress.PluginConfig = (on, config) => {
debug("Disabled? %s", process.env.CYPRESS_REPLAY_DISABLED);

if (process.env.CYPRESS_REPLAY_DISABLED) {
return config;
}

cypressReporter = new CypressReporter(config, debug);

on("before:run", onBeforeRun);
Expand Down
4 changes: 3 additions & 1 deletion packages/cypress/support.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import register from "./src/support";

register();
if (!Cypress.env("REPLAY_DISABLED")) {
register();
}

0 comments on commit 7946601

Please sign in to comment.