Skip to content

docs: clarify setup lifecycle runs per test file#16213

Open
KirtiRamchandani wants to merge 1 commit into
jestjs:mainfrom
KirtiRamchandani:docs/clarify-test-file-setup-lifecycle
Open

docs: clarify setup lifecycle runs per test file#16213
KirtiRamchandani wants to merge 1 commit into
jestjs:mainfrom
KirtiRamchandani:docs/clarify-test-file-setup-lifecycle

Conversation

@KirtiRamchandani

Copy link
Copy Markdown

Summary

Fixes #9267.

The setup lifecycle docs still used ambiguous wording in a few places: setupFilesAfterEnv in the CLI page said it runs before each test, setupFiles said every test gets its own environment, and global setup/teardown referred to test suites. This updates those spots to use the clearer test file terminology recommended in the issue discussion.

Test plan

  • corepack yarn prettier --check docs\CLI.md docs\Configuration.md
  • corepack yarn eslint docs\CLI.md docs\Configuration.md
  • git diff --check

@netlify

netlify Bot commented May 24, 2026

Copy link
Copy Markdown

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit bdba20b
🔍 Latest deploy log https://app.netlify.com/projects/jestjs/deploys/6a134bd16242180008364278
😎 Deploy Preview https://deploy-preview-16213--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.

@pkg-pr-new

pkg-pr-new Bot commented May 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

babel-jest

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

babel-plugin-jest-hoist

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

babel-preset-jest

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

create-jest

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

@jest/diff-sequences

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

expect

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

@jest/expect-utils

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

jest

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

jest-changed-files

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

jest-circus

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

jest-cli

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

jest-config

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

@jest/console

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

@jest/core

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

@jest/create-cache-key-function

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

jest-diff

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

jest-docblock

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

jest-each

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

@jest/environment

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

jest-environment-jsdom

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

@jest/environment-jsdom-abstract

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

jest-environment-node

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

@jest/expect

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

@jest/fake-timers

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

@jest/get-type

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

@jest/globals

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

jest-haste-map

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

jest-jasmine2

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

jest-leak-detector

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

jest-matcher-utils

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

jest-message-util

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

jest-mock

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

@jest/pattern

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

jest-phabricator

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

jest-regex-util

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

@jest/reporters

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

jest-resolve

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

jest-resolve-dependencies

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

jest-runner

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

jest-runtime

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

@jest/schemas

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

jest-snapshot

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

@jest/snapshot-utils

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

@jest/source-map

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

@jest/test-result

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

@jest/test-sequencer

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

@jest/transform

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

@jest/types

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

jest-util

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

jest-validate

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

jest-watcher

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

jest-worker

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

pretty-format

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

commit: bdba20b

@KirtiRamchandani

Copy link
Copy Markdown
Author

The failing macOS jobs look unrelated to this docs-only change. The failed jobs (macOS with shard 1/3 / Node LTS using jest-jasmine2, macOS with shard 3/3 / Node LTS using jest-jasmine2, and macOS with shard 3/3 / Node v24.x) retry yarn test-ci-partial:parallel, and the failure signature is worker processes terminating with signal=SIGSEGV in unrelated suites such as packages/jest-circus/src/__tests__/utils.test.ts and e2e/__tests__/testPathPatternReporterMessage.test.ts.

I don't see anything in this branch that maps to those crashes; this looks like a macOS runner/Node crash and should be safe to rerun.

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.

Documentation in regards to Test Environment

1 participant