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

feat: add CYPRESS_SKIP_VERIFY option to suppress verification #29836

Merged
merged 15 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ _Released 7/16/2024_
- Replaced `json-lint` with `json-parse-even-better-errors`. This removes the [CVE-2021-23358](https://nvd.nist.gov/vuln/detail/CVE-2021-23358) vulnerability being reported in security scans. Addresses [#28207](https://github.com/cypress-io/cypress/issues/28207).
- Updated `minimatch` from `3.0.4` to `3.1.2`. Addressed in [#29821](https://github.com/cypress-io/cypress/pull/29821).

**Misc:**

- Added `CYPRESS_NO_VERIFY` flag to enable suppression of Cypress verification checks. Addresses [#22243](https://github.com/cypress-io/cypress/issues/22243)
joshuajtward marked this conversation as resolved.
Show resolved Hide resolved

## 13.13.0

_Released 7/01/2024_
Expand Down
5 changes: 5 additions & 0 deletions cli/lib/tasks/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,13 @@ const start = (options = {}) => {
force: false,
welcomeMessage: true,
smokeTestTimeout: VERIFY_TEST_RUNNER_TIMEOUT_MS,
skipVerify: util.getEnv('CYPRESS_SKIP_VERIFY') || 'false',
joshuajtward marked this conversation as resolved.
Show resolved Hide resolved
})

if (options.skipVerify === 'true') {
joshuajtward marked this conversation as resolved.
Show resolved Hide resolved
return Promise.resolve()
joshuajtward marked this conversation as resolved.
Show resolved Hide resolved
}

if (options.dev) {
return runSmokeTest('', options)
}
Expand Down
10 changes: 10 additions & 0 deletions cli/test/lib/tasks/verify_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading