forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(server): use run#run instead of run#ready to replicate e2e exit b…
…ehavior in CT (cypress-io#17894) Co-authored-by: Zach Bloomquist <[email protected]>
- Loading branch information
1 parent
a99caea
commit ea287d7
Showing
8 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const e2e = require('../support/helpers/e2e').default | ||
|
||
describe('run-ct', () => { | ||
e2e.setup() | ||
|
||
e2e.it('reports correct exit code when failing', { | ||
spec: 'simple_failing_spec.js', | ||
testingType: 'component', | ||
snapshot: false, | ||
expectedExitCode: 2, | ||
}) | ||
}) |
10 changes: 10 additions & 0 deletions
10
packages/server/test/support/fixtures/projects/e2e/cypress/component/simple_failing_spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* eslint-disable no-undef */ | ||
describe('simple failing spec', () => { | ||
it('fails1', () => { | ||
cy.wrap(true, { timeout: 100 }).should('be.false') | ||
}) | ||
|
||
it('fails2', () => { | ||
throw new Error('fails2') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters