Skip to content

Commit

Permalink
fix: retrieve 'exit' from config instead of options (#19567)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschile committed Jan 6, 2022
1 parent 59e42af commit 642ec41
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ yarn test-watch /test/path/to/spec.js

### Running individual unit tests

```bashtest-kitchensink
```bash
yarn test <path/to/test>
yarn test test/unit/api_spec.js
## or
Expand All @@ -68,7 +68,7 @@ yarn test-integration cli_spec ## shorthand, uses globbing to find spec

> With the addition of Component Testing, `e2e` tests have been renamed to `system-tests` and moved to the [`system-tests`](../../system-tests) directory.
### Updating snaphots
### Updating snapshots

Prepend `SNAPSHOT_UPDATE=1` to any test command. See [`snap-shot-it` instructions](https://github.com/bahmutov/snap-shot-it#advanced-use) for more info.

Expand Down
4 changes: 1 addition & 3 deletions packages/server/lib/modes/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,6 @@ module.exports = {
})

if (browser.family !== 'chromium' && !options.config.chromeWebSecurity) {
console.log()
errors.warning('CHROME_WEB_SECURITY_NOT_SUPPORTED', browser.family)
}

Expand Down Expand Up @@ -1460,7 +1459,7 @@ module.exports = {
compressedVideoName: videoRecordProps.compressedVideoName,
endVideoCapture: videoRecordProps.endVideoCapture,
startedVideoCapture: videoRecordProps.startedVideoCapture,
exit: options.exit,
exit: config.exit,
videoCompression: options.videoCompression,
videoUploadOnPasses: options.videoUploadOnPasses,
quiet: options.quiet,
Expand Down Expand Up @@ -1608,7 +1607,6 @@ module.exports = {
video: config.video,
videoCompression: config.videoCompression,
videoUploadOnPasses: config.videoUploadOnPasses,
exit: options.exit,
headed: options.headed,
quiet: options.quiet,
outputPath: options.outputPath,
Expand Down
15 changes: 15 additions & 0 deletions packages/server/test/unit/modes/run_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,21 @@ describe('lib/modes/run', () => {
})
})

it('passes exit from config to waitForTestsToFinishRunning', function () {
this.projectInstance.getConfig.restore()
sinon.stub(this.projectInstance, 'getConfig').resolves({
proxyUrl: 'http://localhost:12345',
exit: false,
})

return runMode.run()
.then(() => {
expect(runMode.waitForTestsToFinishRunning).to.be.calledWithMatch({
exit: false,
})
})
})

it('passes headed to openProject.launch', () => {
const browser = { name: 'electron', family: 'chromium' }

Expand Down

3 comments on commit 642ec41

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 642ec41 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/9.2.1/circle-develop-642ec4140641fa4040ac9e109eeb1a4057f7e69c/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 642ec41 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/9.2.1/circle-develop-642ec4140641fa4040ac9e109eeb1a4057f7e69c/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 642ec41 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/9.2.1/circle-develop-642ec4140641fa4040ac9e109eeb1a4057f7e69c/cypress.tgz

Please sign in to comment.