Skip to content

"No tests found in your file" when error thrown outside suite with .only #14455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kuceb opened this issue Jan 7, 2021 · 2 comments · Fixed by #14456
Closed

"No tests found in your file" when error thrown outside suite with .only #14455

kuceb opened this issue Jan 7, 2021 · 2 comments · Fixed by #14456

Comments

@kuceb
Copy link
Contributor

kuceb commented Jan 7, 2021

Given you have a .only on a suite, and have an error thrown outside a test:

import './setup'

describe.only('suite', ()=>{
  it('t1', ()=>{
    
  })
  it('t2', ()=>{
    
  })
})

throw new Error('my error')

Current Behavior:
Cypress does not generate a new test for the uncaught failure, but says no tests are found.
image

Expected:
image

Bug since: unknown

(originally found during feature work)

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 13, 2021

The code for this is done in cypress-io/cypress#14456, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 20, 2021

Released in 6.3.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.3.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants