Current behavior
In some circumstances invovling skipped tests and the Cypress 'fail' event listener a failure screenshot will be taken when it shouldn't be.
Desired behavior
- A failure screenshot should never be taken when the test is skipped.
- The
fail event handler shouldn't be triggered during skipped tests.
Test code to reproduce
spec.js
Cypress.on('fail', () => {
throw new Error('error')
})
describe('tests', () => {
before(function () {
this.skip()
})
it('failing test', () => {
expect(true).to.be.false
})
})

Cypress Version
8.2.0
Other
No response
Current behavior
In some circumstances invovling skipped tests and the Cypress 'fail' event listener a failure screenshot will be taken when it shouldn't be.
Desired behavior
failevent handler shouldn't be triggered during skipped tests.Test code to reproduce
spec.jsCypress Version
8.2.0
Other
No response