diff --git a/CHANGELOG.md b/CHANGELOG.md index 494d0b5f05b3..3d5460f3002b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ - `[docs]` Add missing export statement in `puppeteer_environment.js` under `docs/Puppeteer.md` ([#7127](https://github.com/facebook/jest/pull/7127)) - `[docs]` Removed useless expect.assertions in `TestingAsyncCode.md` ([#7131](https://github.com/facebook/jest/pull/7131)) - `[docs]` Remove references to `@providesModule` which isn't supported anymore ([#7147](https://github.com/facebook/jest/pull/7147)) +- `[docs]` Update `setupFiles` documentation for clarity ([#7187](https://github.com/facebook/jest/pull/7187)) ### Performance diff --git a/docs/Configuration.md b/docs/Configuration.md index 0c70b41ed22d..4cb938e87af2 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -628,9 +628,9 @@ If you need to restrict your test-runner to only run in serial rather then being Default: `[]` -The paths to modules that run some code to configure or set up the testing environment before each test. Since every test runs in its own environment, these scripts will be executed in the testing environment immediately before executing the test code itself. +The paths to modules that run some code to configure or set up the testing environment. Each setupFile will be run once per test file. Since every test runs in its own environment, these scripts will be executed in the testing environment immediately before executing the test code itself. -It's worth noting that this code will execute _before_ [`setupTestFrameworkScriptFile`](#setuptestframeworkscriptfile-string). +It's also worth noting that `setupFiles` will execute _before_ [`setupTestFrameworkScriptFile`](#setuptestframeworkscriptfile-string). ### `setupTestFrameworkScriptFile` [string] diff --git a/website/versioned_docs/version-23.6/Configuration.md b/website/versioned_docs/version-23.6/Configuration.md index 616e51e4497a..430741801ac9 100644 --- a/website/versioned_docs/version-23.6/Configuration.md +++ b/website/versioned_docs/version-23.6/Configuration.md @@ -629,9 +629,9 @@ If you need to restrict your test-runner to only run in serial rather then being Default: `[]` -The paths to modules that run some code to configure or set up the testing environment before each test. Since every test runs in its own environment, these scripts will be executed in the testing environment immediately before executing the test code itself. +The paths to modules that run some code to configure or set up the testing environment. Each setupFile will be run once per test file. Since every test runs in its own environment, these scripts will be executed in the testing environment immediately before executing the test code itself. -It's worth noting that this code will execute _before_ [`setupTestFrameworkScriptFile`](#setuptestframeworkscriptfile-string). +It's also worth noting that `setupFiles` will execute _before_ [`setupTestFrameworkScriptFile`](#setuptestframeworkscriptfile-string). ### `setupTestFrameworkScriptFile` [string]