diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index d7ac9f10f189..8b0e6ece428f 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -1139,7 +1139,7 @@ test('will fail', () => { }); ``` -`retryImmediately` option is used to retry the failed test immediately after the failure. If this option is not specified, the tests are retried after Jest is finished running all test in a file. +`retryImmediately` option is used to retry the failed test immediately after the failure. If this option is not specified, the tests are retried after Jest is finished running all other tests in the file. ```js jest.retryTimes(3, {retryImmediately: true}); diff --git a/packages/jest-circus/src/run.ts b/packages/jest-circus/src/run.ts index 3d7dd89f95cf..4f8ae2e6dcfb 100644 --- a/packages/jest-circus/src/run.ts +++ b/packages/jest-circus/src/run.ts @@ -116,7 +116,7 @@ const _runTestsForDescribeBlock = async ( const hasRetryTimes = retryTimes > 0; await _runTest(child, isSkipped); - //If immediate retry is set, we retry the test immediately after the first run + // If immediate retry is set, we retry the test immediately after the first run if ( retryImmediately && hasErrorsBeforeTestRun === false &&