Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): add note about retryTimes placement #12212

Merged
merged 2 commits into from Feb 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/versioned_docs/version-27.4/JestObjectAPI.md
Expand Up @@ -716,7 +716,7 @@ jest.setTimeout(1000); // 1 second

### `jest.retryTimes()`

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!
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 block.
Michael-M-Judd marked this conversation as resolved.
Show resolved Hide resolved

Example in a test:

Expand Down