Skip to content

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

Closed
@kuceb

Description

@kuceb

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions