diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 2437da53ecd5..bd2e581d08d0 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -1,5 +1,5 @@ -## 13.13.4 +## 13.14.0 _Released 8/27/2024 (PENDING)_ @@ -7,6 +7,10 @@ _Released 8/27/2024 (PENDING)_ - Fixed a potential memory leak in the Cypress server when re-connecting to an unintentionally disconnected CDP connection. Fixes [#29744](https://github.com/cypress-io/cypress/issues/29744). Addressed in [#29988](https://github.com/cypress-io/cypress/pull/29988) +**Features:** + +- Added a `CYPRESS_SKIP_VERIFY` flag to enable suppressing Cypress verification checks. Addresses [#22243](https://github.com/cypress-io/cypress/issues/22243). + **Dependency Updates:** - Updated `detect-port` from `1.3.0` to `1.6.1`. Addressed in [#30038](https://github.com/cypress-io/cypress/pull/30038). diff --git a/cli/lib/tasks/verify.js b/cli/lib/tasks/verify.js index 87e44412b67b..8c666720fb88 100644 --- a/cli/lib/tasks/verify.js +++ b/cli/lib/tasks/verify.js @@ -258,8 +258,15 @@ const start = (options = {}) => { force: false, welcomeMessage: true, smokeTestTimeout: VERIFY_TEST_RUNNER_TIMEOUT_MS, + skipVerify: util.getEnv('CYPRESS_SKIP_VERIFY') === 'true', }) + if (options.skipVerify) { + debug('skipping verification of the Cypress app') + + return Promise.resolve() + } + if (options.dev) { return runSmokeTest('', options) } diff --git a/cli/test/lib/tasks/verify_spec.js b/cli/test/lib/tasks/verify_spec.js index 356a8f0c478d..78a8272eec37 100644 --- a/cli/test/lib/tasks/verify_spec.js +++ b/cli/test/lib/tasks/verify_spec.js @@ -97,6 +97,16 @@ context('lib/tasks/verify', () => { expect(newVerifyInstance.VERIFY_TEST_RUNNER_TIMEOUT_MS).to.eql(DEFAULT_VERIFY_TIMEOUT) }) + it('returns early when `CYPRESS_SKIP_VERIFY` is set to true', () => { + process.env.CYPRESS_SKIP_VERIFY = 'true' + delete require.cache[require.resolve(`${lib}/tasks/verify`)] + const newVerifyInstance = require(`${lib}/tasks/verify`) + + return newVerifyInstance.start().then((result) => { + expect(result).to.eq(undefined) + }) + }) + it('logs error and exits when no version of Cypress is installed', () => { return verify .start()