Skip to content

[Bug]: Scripts with syntax errors are ignored by --onlyFailures #15382

@geoffswift

Description

@geoffswift

Version

29.7.0

Steps to reproduce

  • Have a test script with a syntax error in it
  • Execute your tests and observe a test is reported as having failed
  • Execute the tests again with jest -f, and observe the output is
No failed test found.

Expected behavior

I would expect to be able to fix my script and rerun it with jest -f

Actual behavior

Executing jest -f yields

No failed test found.

Additional context

No response

Environment

System:
    OS: macOS 15.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 20.12.0 - ~/.nvm/versions/node/v20.12.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.9.0 - ~/.nvm/versions/node/v20.12.0/bin/npm
    pnpm: 8.5.1 - /opt/homebrew/bin/pnpm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions