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

Consistent env var naming #83

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

peterjaap
Copy link
Contributor

@peterjaap peterjaap commented Sep 14, 2022

Cypress will automatically take any env vars starting with CYPRESS_ and make them camelcased. The resulting var name will then be overlaid on the e2e settings in the config file as it is present in this repo.

So the value in CYPRESS_BASE_URL will always be overlaid on whatever you set here;

module.exports = defineConfig({
    e2e: {
        baseUrl: `whatever-you-set-here-will-be-overridden-with-CYPRESS_BASE_URL-if-set`,
    }
}

See https://github.com/cypress-io/cypress/blob/a27affe4477da85f07a5075dc2fca3ae61d50489/packages/config/src/project/utils.ts#L83

@peterjaap peterjaap changed the title Update cypress.config.js Consistent env var naming Sep 14, 2022
cypress.config.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants