Skip to content

Commit 482358b

Browse files
joshuajtwardjennifer-shehaneAtofStryker
authored
feat: add CYPRESS_SKIP_VERIFY option to suppress verification (#29836)
* misc: add `CYPRESS_SKIP_VERIFY` option to suppress verification * Update CHANGELOG.md * Move changelog entry to feature * Whoops - features * Update CHANGELOG.md * Update cli/lib/tasks/verify.js Co-authored-by: Bill Glesias <[email protected]> * Update cli/lib/tasks/verify.js Co-authored-by: Bill Glesias <[email protected]> * Update cli/lib/tasks/verify.js Co-authored-by: Bill Glesias <[email protected]> * Appease the linter --------- Co-authored-by: Jennifer Shehane <[email protected]> Co-authored-by: Bill Glesias <[email protected]>
1 parent 8b54d3e commit 482358b

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

cli/CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
2-
## 13.13.4
2+
## 13.14.0
33

44
_Released 8/27/2024 (PENDING)_
55

66
**Performance:**
77

88
- 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)
99

10+
**Features:**
11+
12+
- Added a `CYPRESS_SKIP_VERIFY` flag to enable suppressing Cypress verification checks. Addresses [#22243](https://github.com/cypress-io/cypress/issues/22243).
13+
1014
**Dependency Updates:**
1115

1216
- Updated `detect-port` from `1.3.0` to `1.6.1`. Addressed in [#30038](https://github.com/cypress-io/cypress/pull/30038).

cli/lib/tasks/verify.js

+7
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,15 @@ const start = (options = {}) => {
258258
force: false,
259259
welcomeMessage: true,
260260
smokeTestTimeout: VERIFY_TEST_RUNNER_TIMEOUT_MS,
261+
skipVerify: util.getEnv('CYPRESS_SKIP_VERIFY') === 'true',
261262
})
262263

264+
if (options.skipVerify) {
265+
debug('skipping verification of the Cypress app')
266+
267+
return Promise.resolve()
268+
}
269+
263270
if (options.dev) {
264271
return runSmokeTest('', options)
265272
}

cli/test/lib/tasks/verify_spec.js

+10
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ context('lib/tasks/verify', () => {
9797
expect(newVerifyInstance.VERIFY_TEST_RUNNER_TIMEOUT_MS).to.eql(DEFAULT_VERIFY_TIMEOUT)
9898
})
9999

100+
it('returns early when `CYPRESS_SKIP_VERIFY` is set to true', () => {
101+
process.env.CYPRESS_SKIP_VERIFY = 'true'
102+
delete require.cache[require.resolve(`${lib}/tasks/verify`)]
103+
const newVerifyInstance = require(`${lib}/tasks/verify`)
104+
105+
return newVerifyInstance.start().then((result) => {
106+
expect(result).to.eq(undefined)
107+
})
108+
})
109+
100110
it('logs error and exits when no version of Cypress is installed', () => {
101111
return verify
102112
.start()

0 commit comments

Comments
 (0)