From a63f84c679e473854c4165267984d845586baf72 Mon Sep 17 00:00:00 2001 From: Michael Judd Date: Tue, 4 Jan 2022 16:24:22 -0500 Subject: [PATCH 1/2] chore(JestObjectAPI.md): add note about retryTimes placement --- website/versioned_docs/version-27.4/JestObjectAPI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/versioned_docs/version-27.4/JestObjectAPI.md b/website/versioned_docs/version-27.4/JestObjectAPI.md index 957e90cd6505..afebd0a624d3 100644 --- a/website/versioned_docs/version-27.4/JestObjectAPI.md +++ b/website/versioned_docs/version-27.4/JestObjectAPI.md @@ -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. Example in a test: From 88cd168adb2afc8d7c3c1c7e232bd55fe5acf3e9 Mon Sep 17 00:00:00 2001 From: Michael Judd Date: Thu, 13 Jan 2022 13:18:23 -0500 Subject: [PATCH 2/2] chore: update all versioned docs with jest.retryTimes() --- docs/JestObjectAPI.md | 2 +- website/versioned_docs/version-27.0/JestObjectAPI.md | 2 +- website/versioned_docs/version-27.1/JestObjectAPI.md | 2 +- website/versioned_docs/version-27.2/JestObjectAPI.md | 2 +- website/versioned_docs/version-27.4/JestObjectAPI.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index 957e90cd6505..16ca6cdcd6f5 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -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` or a `test` block. Example in a test: diff --git a/website/versioned_docs/version-27.0/JestObjectAPI.md b/website/versioned_docs/version-27.0/JestObjectAPI.md index ddfd7fafea74..6b5daf2d10df 100644 --- a/website/versioned_docs/version-27.0/JestObjectAPI.md +++ b/website/versioned_docs/version-27.0/JestObjectAPI.md @@ -672,7 +672,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` or a `test` block. Example in a test: diff --git a/website/versioned_docs/version-27.1/JestObjectAPI.md b/website/versioned_docs/version-27.1/JestObjectAPI.md index ddfd7fafea74..6b5daf2d10df 100644 --- a/website/versioned_docs/version-27.1/JestObjectAPI.md +++ b/website/versioned_docs/version-27.1/JestObjectAPI.md @@ -672,7 +672,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` or a `test` block. Example in a test: diff --git a/website/versioned_docs/version-27.2/JestObjectAPI.md b/website/versioned_docs/version-27.2/JestObjectAPI.md index ddfd7fafea74..6b5daf2d10df 100644 --- a/website/versioned_docs/version-27.2/JestObjectAPI.md +++ b/website/versioned_docs/version-27.2/JestObjectAPI.md @@ -672,7 +672,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` or a `test` block. Example in a test: diff --git a/website/versioned_docs/version-27.4/JestObjectAPI.md b/website/versioned_docs/version-27.4/JestObjectAPI.md index afebd0a624d3..16ca6cdcd6f5 100644 --- a/website/versioned_docs/version-27.4/JestObjectAPI.md +++ b/website/versioned_docs/version-27.4/JestObjectAPI.md @@ -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! 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. +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. Example in a test: