cypress-io / cypress-realworld-testing

Next.js project for learn.cypress.io

Home Page:https://learn.cypress.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Confusing reference to Cypress.env variables

rsivan opened this issue · comments

On content/real-world-examples/overview/custom-cypress-commands.mdx, under cy.loginByAPI(), it says:
Note how we are using [Cypress.env()](https://docs.cypress.io/api/cypress-api/env) to handle our environment variables. You can find these in cypres/plugins/index.ts and cypress.json, respectively.

I find the statement "You can find these in cypres/plugins/index.ts and cypress.json, respectively." confusing or misleading, as the variables are actually defined in cypress.config.ts

@rsivan

You're right. The description became incorrect after the Cypress Real World App was migrated to Cypress 10.x. It used to be correct for legacy configurations of Cypress 9.x and lower.