W3cubDocs

/Cypress

Cypress.version

Cypress.version returns you the current version of Cypress you are running.

Syntax

Cypress.version // '1.1.0'

Examples

Conditionals

const semver = require('semver')

if (semver.gte(Cypress.version, '1.1.3')) {
  it('has Cypress.platform', () => {
    expect(Cypress.platform).to.be.a('string')
  })
}

Hint: you can use semver library to work with semantic versions.

© 2017 Cypress.io
Licensed under the MIT License.
https://docs.cypress.io/api/cypress-api/version.html