From c5a7da0ae0e3bad1ae79236efbf2e1e321b310a3 Mon Sep 17 00:00:00 2001 From: Fredrik Teschke Date: Thu, 9 Aug 2018 10:14:29 +0200 Subject: [PATCH 1/2] [doc] add note explaining when `jest.setTimeout` should be called --- docs/JestObjectAPI.md | 2 ++ website/versioned_docs/version-22.0/JestObjectAPI.md | 2 ++ website/versioned_docs/version-22.1/JestObjectAPI.md | 2 ++ website/versioned_docs/version-22.2/JestObjectAPI.md | 2 ++ website/versioned_docs/version-22.3/JestObjectAPI.md | 2 ++ website/versioned_docs/version-22.4/JestObjectAPI.md | 2 ++ website/versioned_docs/version-23.0/JestObjectAPI.md | 2 ++ website/versioned_docs/version-23.1/JestObjectAPI.md | 2 ++ website/versioned_docs/version-23.2/JestObjectAPI.md | 2 ++ website/versioned_docs/version-23.3/JestObjectAPI.md | 2 ++ 10 files changed, 20 insertions(+) diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index 65b6338e800e..29a107fe86a7 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -396,6 +396,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js diff --git a/website/versioned_docs/version-22.0/JestObjectAPI.md b/website/versioned_docs/version-22.0/JestObjectAPI.md index 8cf41bddf746..4feb0d61c112 100644 --- a/website/versioned_docs/version-22.0/JestObjectAPI.md +++ b/website/versioned_docs/version-22.0/JestObjectAPI.md @@ -284,6 +284,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js diff --git a/website/versioned_docs/version-22.1/JestObjectAPI.md b/website/versioned_docs/version-22.1/JestObjectAPI.md index ec5ca47adedf..762c064ce479 100644 --- a/website/versioned_docs/version-22.1/JestObjectAPI.md +++ b/website/versioned_docs/version-22.1/JestObjectAPI.md @@ -282,6 +282,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js diff --git a/website/versioned_docs/version-22.2/JestObjectAPI.md b/website/versioned_docs/version-22.2/JestObjectAPI.md index 1348db261ceb..3da280fe409f 100644 --- a/website/versioned_docs/version-22.2/JestObjectAPI.md +++ b/website/versioned_docs/version-22.2/JestObjectAPI.md @@ -283,6 +283,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js diff --git a/website/versioned_docs/version-22.3/JestObjectAPI.md b/website/versioned_docs/version-22.3/JestObjectAPI.md index 0122c22883c4..d9c61f926299 100644 --- a/website/versioned_docs/version-22.3/JestObjectAPI.md +++ b/website/versioned_docs/version-22.3/JestObjectAPI.md @@ -283,6 +283,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js diff --git a/website/versioned_docs/version-22.4/JestObjectAPI.md b/website/versioned_docs/version-22.4/JestObjectAPI.md index fc2282f27d98..cb1c90d86b1e 100644 --- a/website/versioned_docs/version-22.4/JestObjectAPI.md +++ b/website/versioned_docs/version-22.4/JestObjectAPI.md @@ -365,6 +365,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js diff --git a/website/versioned_docs/version-23.0/JestObjectAPI.md b/website/versioned_docs/version-23.0/JestObjectAPI.md index ed41dd7d7106..8f3b459aac4e 100644 --- a/website/versioned_docs/version-23.0/JestObjectAPI.md +++ b/website/versioned_docs/version-23.0/JestObjectAPI.md @@ -365,6 +365,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js diff --git a/website/versioned_docs/version-23.1/JestObjectAPI.md b/website/versioned_docs/version-23.1/JestObjectAPI.md index b5a2538f8aae..ed72108e5a30 100644 --- a/website/versioned_docs/version-23.1/JestObjectAPI.md +++ b/website/versioned_docs/version-23.1/JestObjectAPI.md @@ -365,6 +365,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js diff --git a/website/versioned_docs/version-23.2/JestObjectAPI.md b/website/versioned_docs/version-23.2/JestObjectAPI.md index 3ec19dc06965..039c1293432b 100644 --- a/website/versioned_docs/version-23.2/JestObjectAPI.md +++ b/website/versioned_docs/version-23.2/JestObjectAPI.md @@ -365,6 +365,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js diff --git a/website/versioned_docs/version-23.3/JestObjectAPI.md b/website/versioned_docs/version-23.3/JestObjectAPI.md index 178269186892..4d72a9d02052 100644 --- a/website/versioned_docs/version-23.3/JestObjectAPI.md +++ b/website/versioned_docs/version-23.3/JestObjectAPI.md @@ -397,6 +397,8 @@ Set the default timeout interval for tests and before/after hooks in millisecond _Note: The default timeout interval is 5 seconds if this method is not called._ +_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`._ + Example: ```js From b4e93f0db66a20db52b1ccaaabf9f8b3ac69017a Mon Sep 17 00:00:00 2001 From: Fredrik Teschke Date: Fri, 10 Aug 2018 16:59:10 +0200 Subject: [PATCH 2/2] [doc] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36003f385552..871dfbcd7d15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ - `[jest-cli]` Fix `testMatch` not working with negations ([#6648](https://github.com/facebook/jest/pull/6648)) - `[jest-cli]` Don't report promises as open handles ([#6716](https://github.com/facebook/jest/pull/6716)) +### Chore & Maintenance + +- `[docs]` Add note explaining when `jest.setTimeout` should be called ([#6817](https://github.com/facebook/jest/pull/6817/files)) + ## 23.4.2 ### Performance