Skip to content

Commit

Permalink
feat: Opt in only for multi reporter configuration (#300)
Browse files Browse the repository at this point in the history
* Only configure multi reporters if required

* Add a warning to move reporter config

* fmt

* Update src/cypress-runner.ts

Co-authored-by: Alex Plischke <alex.plischke@saucelabs.com>

* Check reporters length

* Not just multiple reporter configs that are deprecated

* Be specific that its cypress reporters

---------

Co-authored-by: Alex Plischke <alex.plischke@saucelabs.com>
  • Loading branch information
mhan83 and alexplischke authored Jul 18, 2024
1 parent 7f455bb commit 609cd58
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cypress-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ function getCypressOpts(
opts.key = runCfg.cypress.key;
}

opts = configureReporters(runCfg, opts);
if (runCfg.cypress.reporters && runCfg.cypress.reporters.length > 0) {
opts = configureReporters(runCfg, opts);
console.log(
'Configuring cypress reporters with saucectl is deprecated and will be removed in a future release. Migrate your configuration to your cypress config file.',
);
}
configureWebkitOptions(process.env, opts, suite);

return opts as CypressCommandLine.CypressRunOptions;
Expand Down

0 comments on commit 609cd58

Please sign in to comment.