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

Make it clearer that jest.setTimeout() is for the entire file #12809

Merged
merged 5 commits into from May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion docs/JestObjectAPI.md
Expand Up @@ -819,7 +819,9 @@ This function is not available when using legacy fake timers implementation.

### `jest.setTimeout(timeout)`

Set the default timeout interval for tests and before/after hooks in milliseconds. This only affects the test file from which this function is called.
Set the default timeout interval (in milliseconds) for all tests and before/after hooks in the test file. This only affects the test file from which this function is called.

To set timeout intervals on different tests in the same file, use the [`timeout` option on each individual test](GlobalAPI.md#testname-fn-timeout).

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

Expand Down
4 changes: 3 additions & 1 deletion website/versioned_docs/version-25.x/JestObjectAPI.md
Expand Up @@ -642,7 +642,9 @@ Returns the number of fake timers still left to run.

### `jest.setTimeout(timeout)`

Set the default timeout interval for tests and before/after hooks in milliseconds. This only affects the test file from which this function is called.
Set the default timeout interval (in milliseconds) for all tests and before/after hooks in the test file. This only affects the test file from which this function is called.

To set timeout intervals on different tests in the same file, use the [`timeout` option on each individual test](GlobalAPI.md#testname-fn-timeout).

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

Expand Down
4 changes: 3 additions & 1 deletion website/versioned_docs/version-26.x/JestObjectAPI.md
Expand Up @@ -662,7 +662,9 @@ When mocking time, `Date.now()` will also be mocked. If you for some reason need

### `jest.setTimeout(timeout)`

Set the default timeout interval for tests and before/after hooks in milliseconds. This only affects the test file from which this function is called.
Set the default timeout interval (in milliseconds) for all tests and before/after hooks in the test file. This only affects the test file from which this function is called.

To set timeout intervals on different tests in the same file, use the [`timeout` option on each individual test](GlobalAPI.md#testname-fn-timeout).

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

Expand Down
4 changes: 3 additions & 1 deletion website/versioned_docs/version-27.x/JestObjectAPI.md
Expand Up @@ -702,7 +702,9 @@ When mocking time, `Date.now()` will also be mocked. If you for some reason need

### `jest.setTimeout(timeout)`

Set the default timeout interval for tests and before/after hooks in milliseconds. This only affects the test file from which this function is called.
Set the default timeout interval (in milliseconds) for all tests and before/after hooks in the test file. This only affects the test file from which this function is called.

To set timeout intervals on different tests in the same file, use the [`timeout` option on each individual test](GlobalAPI.md#testname-fn-timeout).

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

Expand Down
4 changes: 3 additions & 1 deletion website/versioned_docs/version-28.0/JestObjectAPI.md
Expand Up @@ -819,7 +819,9 @@ This function is not available when using legacy fake timers implementation.

### `jest.setTimeout(timeout)`

Set the default timeout interval for tests and before/after hooks in milliseconds. This only affects the test file from which this function is called.
Set the default timeout interval (in milliseconds) for all tests and before/after hooks in the test file. This only affects the test file from which this function is called.

To set timeout intervals on different tests in the same file, use the [`timeout` option on each individual test](GlobalAPI.md#testname-fn-timeout).

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

Expand Down