Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyrohrbough committed Oct 29, 2021
1 parent e1cdde4 commit 891567a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
4 changes: 0 additions & 4 deletions packages/driver/cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,5 @@
"reporter": "cypress-multi-reporters",
"reporterOptions": {
"configFile": "../../mocha-reporter-config.json"
},
"retries": {
"runMode": 2,
"openMode": 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ const helpers = require('../../support/helpers')
const { _, Promise, $ } = Cypress

describe('src/cy/commands/navigation', () => {
before(() => {
expect(Cypress.config('retries')).to.deep.eq({
runMode: 2,
openMode: 0,
})
})

context('#reload', () => {
before(() => {
cy
Expand Down Expand Up @@ -183,7 +176,6 @@ describe('src/cy/commands/navigation', () => {
})

it('throws passing 1 invalid argument', (done) => {
expect(Cypress.config('retries')).to.deep.eq({ runMode: 2, openMode: 0 })
cy.on('fail', (err) => {
expect(err.message).to.eq('`cy.reload()` can only accept a boolean or `options` as its arguments.')
expect(err.docsUrl).to.eq('https://on.cypress.io/reload')
Expand Down
16 changes: 9 additions & 7 deletions packages/driver/cypress/support/defaults.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const { $ } = Cypress

before(() => {
expect(Cypress.config('retries')).to.deep.eq({ runMode: 2, openMode: 0 })
})

beforeEach(() => {
const isActuallyInteractive = Cypress.config('isInteractive')

Expand All @@ -13,9 +9,15 @@ beforeEach(() => {
Cypress.config('isInteractive', true)

if (!isActuallyInteractive) {
// necessary or else snapshots will not be taken
// and we can't test them
Cypress.config('numTestsKeptInMemory', 1)
Cypress.config({
// necessary or else snapshots will not be taken
// and we can't test them
'numTestsKeptInMemory': 1,
// forcing interactive mode so force retries
// when test started in 'runMode'
// only want retries for 'runMode'
'config': 2,
})
}

// remove all event listeners
Expand Down

0 comments on commit 891567a

Please sign in to comment.