Skip to content

Commit 4715c09

Browse files
chore(docs): add note about retryTimes placement (#12212)
1 parent 9d6fb4b commit 4715c09

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

docs/JestObjectAPI.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ jest.setTimeout(1000); // 1 second
716716

717717
### `jest.retryTimes()`
718718

719-
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner!
719+
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner! This must live at the top-level of a test file or in a describe block. Retries _will not_ work if `jest.retryTimes()` is called in a `beforeEach` or a `test` block.
720720

721721
Example in a test:
722722

website/versioned_docs/version-27.0/JestObjectAPI.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ jest.setTimeout(1000); // 1 second
672672

673673
### `jest.retryTimes()`
674674

675-
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner!
675+
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner! This must live at the top-level of a test file or in a describe block. Retries _will not_ work if `jest.retryTimes()` is called in a `beforeEach` or a `test` block.
676676

677677
Example in a test:
678678

website/versioned_docs/version-27.1/JestObjectAPI.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ jest.setTimeout(1000); // 1 second
672672

673673
### `jest.retryTimes()`
674674

675-
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner!
675+
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner! This must live at the top-level of a test file or in a describe block. Retries _will not_ work if `jest.retryTimes()` is called in a `beforeEach` or a `test` block.
676676

677677
Example in a test:
678678

website/versioned_docs/version-27.2/JestObjectAPI.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ jest.setTimeout(1000); // 1 second
672672

673673
### `jest.retryTimes()`
674674

675-
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner!
675+
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner! This must live at the top-level of a test file or in a describe block. Retries _will not_ work if `jest.retryTimes()` is called in a `beforeEach` or a `test` block.
676676

677677
Example in a test:
678678

website/versioned_docs/version-27.4/JestObjectAPI.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ jest.setTimeout(1000); // 1 second
716716

717717
### `jest.retryTimes()`
718718

719-
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner!
719+
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner! This must live at the top-level of a test file or in a describe block. Retries _will not_ work if `jest.retryTimes()` is called in a `beforeEach` or a `test` block.
720720

721721
Example in a test:
722722

0 commit comments

Comments
 (0)