Skip to content

Conversation

joshkel
Copy link
Contributor

@joshkel joshkel commented Aug 2, 2025

Summary

Previously, the onlyFailures feature only included tests that loaded, ran, and reported failed tests. If a test failed to run completely (e.g., due to a syntax error or module import failure), it was excluded. This PR changes that.

Test plan

I ran Jest in watch mode locally with and without the change, against a test suite with a syntax error and a test suite with a module resolution failure, and confirmed that the suites were included as desired when "only failed tests" was activated by pressing the F key.

Copy link

netlify bot commented Aug 2, 2025

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b9bee48
🔍 Latest deploy log https://app.netlify.com/projects/jestjs/deploys/68ae7f6f646c5f0008309ef6
😎 Deploy Preview https://deploy-preview-15769--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

pkg-pr-new bot commented Aug 2, 2025

Open in StackBlitz

babel-jest

npm i https://pkg.pr.new/babel-jest@15769

babel-plugin-jest-hoist

npm i https://pkg.pr.new/babel-plugin-jest-hoist@15769

babel-preset-jest

npm i https://pkg.pr.new/babel-preset-jest@15769

create-jest

npm i https://pkg.pr.new/create-jest@15769

@jest/diff-sequences

npm i https://pkg.pr.new/@jest/diff-sequences@15769

expect

npm i https://pkg.pr.new/expect@15769

@jest/expect-utils

npm i https://pkg.pr.new/@jest/expect-utils@15769

jest

npm i https://pkg.pr.new/jest@15769

jest-changed-files

npm i https://pkg.pr.new/jest-changed-files@15769

jest-circus

npm i https://pkg.pr.new/jest-circus@15769

jest-cli

npm i https://pkg.pr.new/jest-cli@15769

jest-config

npm i https://pkg.pr.new/jest-config@15769

@jest/console

npm i https://pkg.pr.new/@jest/console@15769

@jest/core

npm i https://pkg.pr.new/@jest/core@15769

@jest/create-cache-key-function

npm i https://pkg.pr.new/@jest/create-cache-key-function@15769

jest-diff

npm i https://pkg.pr.new/jest-diff@15769

jest-docblock

npm i https://pkg.pr.new/jest-docblock@15769

jest-each

npm i https://pkg.pr.new/jest-each@15769

@jest/environment

npm i https://pkg.pr.new/@jest/environment@15769

jest-environment-jsdom

npm i https://pkg.pr.new/jest-environment-jsdom@15769

@jest/environment-jsdom-abstract

npm i https://pkg.pr.new/@jest/environment-jsdom-abstract@15769

jest-environment-node

npm i https://pkg.pr.new/jest-environment-node@15769

@jest/expect

npm i https://pkg.pr.new/@jest/expect@15769

@jest/fake-timers

npm i https://pkg.pr.new/@jest/fake-timers@15769

@jest/get-type

npm i https://pkg.pr.new/@jest/get-type@15769

@jest/globals

npm i https://pkg.pr.new/@jest/globals@15769

jest-haste-map

npm i https://pkg.pr.new/jest-haste-map@15769

jest-jasmine2

npm i https://pkg.pr.new/jest-jasmine2@15769

jest-leak-detector

npm i https://pkg.pr.new/jest-leak-detector@15769

jest-matcher-utils

npm i https://pkg.pr.new/jest-matcher-utils@15769

jest-message-util

npm i https://pkg.pr.new/jest-message-util@15769

jest-mock

npm i https://pkg.pr.new/jest-mock@15769

@jest/pattern

npm i https://pkg.pr.new/@jest/pattern@15769

jest-phabricator

npm i https://pkg.pr.new/jest-phabricator@15769

jest-regex-util

npm i https://pkg.pr.new/jest-regex-util@15769

@jest/reporters

npm i https://pkg.pr.new/@jest/reporters@15769

jest-resolve

npm i https://pkg.pr.new/jest-resolve@15769

jest-resolve-dependencies

npm i https://pkg.pr.new/jest-resolve-dependencies@15769

jest-runner

npm i https://pkg.pr.new/jest-runner@15769

jest-runtime

npm i https://pkg.pr.new/jest-runtime@15769

@jest/schemas

npm i https://pkg.pr.new/@jest/schemas@15769

jest-snapshot

npm i https://pkg.pr.new/jest-snapshot@15769

@jest/snapshot-utils

npm i https://pkg.pr.new/@jest/snapshot-utils@15769

@jest/source-map

npm i https://pkg.pr.new/@jest/source-map@15769

@jest/test-result

npm i https://pkg.pr.new/@jest/test-result@15769

@jest/test-sequencer

npm i https://pkg.pr.new/@jest/test-sequencer@15769

@jest/transform

npm i https://pkg.pr.new/@jest/transform@15769

@jest/types

npm i https://pkg.pr.new/@jest/types@15769

jest-util

npm i https://pkg.pr.new/jest-util@15769

jest-validate

npm i https://pkg.pr.new/jest-validate@15769

jest-watcher

npm i https://pkg.pr.new/jest-watcher@15769

jest-worker

npm i https://pkg.pr.new/jest-worker@15769

pretty-format

npm i https://pkg.pr.new/pretty-format@15769

commit: b9bee48

Previously, the onlyFailures feature only included tests that loaded, ran, and reported failed tests.  If a test failed to run completely (e.g., due to a syntax error or module import failure), it was excluded.  This PR changes that.
@joshkel joshkel force-pushed the failing-test-suites branch from 6e43a5d to d397d1a Compare August 4, 2025 20:57
Copy link
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, yeah that should totally be how the feature works.

@cpojer cpojer merged commit c9db5c6 into jestjs:main Aug 27, 2025
8 of 9 checks passed
@joshkel joshkel deleted the failing-test-suites branch August 27, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants