Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose configuration through module API #9014

Closed
badeball opened this issue Oct 28, 2020 · 3 comments
Closed

Expose configuration through module API #9014

badeball opened this issue Oct 28, 2020 · 3 comments
Labels
type: enhancement Requested enhancement of existing feature

Comments

@badeball
Copy link
Contributor

badeball commented Oct 28, 2020

What would you like?

As a preprocessor-maintainer, I would like to have configuration resolvement exposed through the module API, like shown below.

const cypress = require("cypress");

await cypress.resolveConfiguration(["--config", "numTestsKeptInMemory=10"], process.env);

/**
 * => {
 *  baseUrl: null,
 *  numTestsKeptInMemory: 10,
 *  integrationFolder: "cypress/integration",
 *   
 *   ...
 * 
 * }
 */

Why is this needed?

To make stuff like this more water-tight. We can only attempt to re-implement the resolvement process, but it's obviously always going to be flaky, unrobust and surprising to the end-user.

@cypress-bot cypress-bot bot added the stage: proposal 💡 No work has been done of this issue label Oct 29, 2020
@jennifer-shehane jennifer-shehane added the type: enhancement Requested enhancement of existing feature label Oct 29, 2020
@badeball
Copy link
Contributor Author

badeball commented Nov 1, 2020

Even better would be to be able to resolve the actual files to be run. Having the configuration is a step in the right direction, but I realize now we would actually still have to re-implement the pattern matching and handling of ignoreTestFiles.

@jennifer-shehane
Copy link
Member

Thanks for taking the time to explain the feature you'd like.

Our team has decided that adding this feature is not currently within the scope of feature work that our team is planning to work on.

This would actually take quite a bit of effort to get working, for a small use case that already has a workaround.

We would be open to reviewing any Pull Requests made implementing the feature. We will also reconsider picking this back up if we see this issue gains more 👍 or comments in support.

@jennifer-shehane jennifer-shehane removed the stage: proposal 💡 No work has been done of this issue label Nov 5, 2020
@badeball
Copy link
Contributor Author

In case anyone stumbles upon this - I've created https://github.com/badeball/cypress-configuration which does re-implement this. FYI, I'm fine with maintaining this myself, but of course wouldn't mind if this ever does get exposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants