Skip to content

Commit 9093a3c

Browse files
ftesthymikee
authored andcommitted
[doc] add note explaining when jest.setTimeout should be called (#6817)
1 parent 79c9e22 commit 9093a3c

File tree

11 files changed

+24
-0
lines changed

11 files changed

+24
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929

3030
- `[docs]` Document another option to avoid warnings with React 16 ([#5258](https://github.com/facebook/jest/issues/5258))
3131

32+
### Chore & Maintenance
33+
34+
- `[docs]` Add note explaining when `jest.setTimeout` should be called ([#6817](https://github.com/facebook/jest/pull/6817/files))
35+
3236
## 23.4.2
3337

3438
### Performance

docs/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
396396

397397
_Note: The default timeout interval is 5 seconds if this method is not called._
398398

399+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
400+
399401
Example:
400402

401403
```js

website/versioned_docs/version-22.0/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
284284

285285
_Note: The default timeout interval is 5 seconds if this method is not called._
286286

287+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
288+
287289
Example:
288290

289291
```js

website/versioned_docs/version-22.1/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
282282

283283
_Note: The default timeout interval is 5 seconds if this method is not called._
284284

285+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
286+
285287
Example:
286288

287289
```js

website/versioned_docs/version-22.2/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
283283

284284
_Note: The default timeout interval is 5 seconds if this method is not called._
285285

286+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
287+
286288
Example:
287289

288290
```js

website/versioned_docs/version-22.3/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
283283

284284
_Note: The default timeout interval is 5 seconds if this method is not called._
285285

286+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
287+
286288
Example:
287289

288290
```js

website/versioned_docs/version-22.4/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
365365

366366
_Note: The default timeout interval is 5 seconds if this method is not called._
367367

368+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
369+
368370
Example:
369371

370372
```js

website/versioned_docs/version-23.0/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
365365

366366
_Note: The default timeout interval is 5 seconds if this method is not called._
367367

368+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
369+
368370
Example:
369371

370372
```js

website/versioned_docs/version-23.1/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
365365

366366
_Note: The default timeout interval is 5 seconds if this method is not called._
367367

368+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
369+
368370
Example:
369371

370372
```js

website/versioned_docs/version-23.2/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
365365

366366
_Note: The default timeout interval is 5 seconds if this method is not called._
367367

368+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
369+
368370
Example:
369371

370372
```js

website/versioned_docs/version-23.3/JestObjectAPI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond
397397

398398
_Note: The default timeout interval is 5 seconds if this method is not called._
399399

400+
_Note: The method must be called after the test framework is installed in the environment and before the test runs. A good place to do this is in the `setupTestFrameworkScriptFile`._
401+
400402
Example:
401403

402404
```js

0 commit comments

Comments
 (0)