Cypress.env()

To get or set environment variable, use Cypress.env().

expect(Cypress.env()).to.be.empty

Cypress.env({
  host: 'veronica.dev.local',
  api_server: 'http://localhost:8888/api/v1/'
})

expect(Cypress.env('host')).to.eq('veronica.dev.local')

Cypress.env('api_server', 'http://localhost:8888/api/v2/')
expect(Cypress.env('api_server')).to.eq('http://localhost:8888/api/v2/')

expect(Cypress.env()).to.have.property('host', 'veronica.dev.local')
expect(Cypress.env()).to.have.property('api_server', 'http://localhost:8888/api/v2/')