diff --git a/docs/GlobalAPI.md b/docs/GlobalAPI.md index 61667e1d7571..7a29a37a7ec1 100644 --- a/docs/GlobalAPI.md +++ b/docs/GlobalAPI.md @@ -525,7 +525,7 @@ test.concurrent('subtraction 2 numbers', async () => { :::tip -Use [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. +Use the [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. ::: @@ -759,7 +759,7 @@ Use `test.failing` when you are writing a test and expecting it to fail. These t :::tip -You can use this type of tests i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. +You can use this type of test i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. It can also be a nice way to contribute failing tests to a project, even if you don't know how to fix the bug. @@ -967,7 +967,7 @@ test.todo('add should be associative'); :::tip -`test.todo` will throw an error, if you will pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. +`test.todo` will throw an error if you pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. ::: diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index f80090e6e48b..d52af3d7c0b0 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -344,7 +344,7 @@ Returns the `jest` object for chaining. :::tip -Writing tests in TypeScript? Use [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. +Writing tests in TypeScript? Use the [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or the [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. ::: @@ -604,7 +604,7 @@ console.log(returnsTrue()); // true; :::tip -See [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. +See the [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. ::: @@ -673,7 +673,7 @@ By default, `jest.spyOn` also calls the **spied** method. This is different beha :::tip -Since `jest.spyOn` is a mock, you could restore the initial state calling [jest.restoreAllMocks](#jestrestoreallmocks) on [afterEach](GlobalAPI.md#aftereachfn-timeout) method. +Since `jest.spyOn` is a mock, you could restore the initial state by calling [`jest.restoreAllMocks`](#jestrestoreallmocks) in the body of the callback passed to the [afterEach](GlobalAPI.md#aftereachfn-timeout) hook. ::: diff --git a/website/versioned_docs/version-25.x/JestObjectAPI.md b/website/versioned_docs/version-25.x/JestObjectAPI.md index dc9ce33a2894..04406566ca62 100644 --- a/website/versioned_docs/version-25.x/JestObjectAPI.md +++ b/website/versioned_docs/version-25.x/JestObjectAPI.md @@ -479,7 +479,7 @@ By default, `jest.spyOn` also calls the **spied** method. This is different beha :::tip -Since `jest.spyOn` is a mock, you could restore the initial state calling [jest.restoreAllMocks](#jestrestoreallmocks) on [afterEach](GlobalAPI.md#aftereachfn-timeout) method. +Since `jest.spyOn` is a mock, you could restore the initial state by calling [`jest.restoreAllMocks`](#jestrestoreallmocks) in the body of the callback passed to the [afterEach](GlobalAPI.md#aftereachfn-timeout) hook. ::: diff --git a/website/versioned_docs/version-26.x/JestObjectAPI.md b/website/versioned_docs/version-26.x/JestObjectAPI.md index 41e158967bc4..32acec7d982f 100644 --- a/website/versioned_docs/version-26.x/JestObjectAPI.md +++ b/website/versioned_docs/version-26.x/JestObjectAPI.md @@ -483,7 +483,7 @@ By default, `jest.spyOn` also calls the **spied** method. This is different beha :::tip -Since `jest.spyOn` is a mock, you could restore the initial state calling [jest.restoreAllMocks](#jestrestoreallmocks) on [afterEach](GlobalAPI.md#aftereachfn-timeout) method. +Since `jest.spyOn` is a mock, you could restore the initial state by calling [`jest.restoreAllMocks`](#jestrestoreallmocks) in the body of the callback passed to the [afterEach](GlobalAPI.md#aftereachfn-timeout) hook. ::: diff --git a/website/versioned_docs/version-27.x/JestObjectAPI.md b/website/versioned_docs/version-27.x/JestObjectAPI.md index 8a758a3b3705..335952952a53 100644 --- a/website/versioned_docs/version-27.x/JestObjectAPI.md +++ b/website/versioned_docs/version-27.x/JestObjectAPI.md @@ -483,7 +483,7 @@ By default, `jest.spyOn` also calls the **spied** method. This is different beha :::tip -Since `jest.spyOn` is a mock, you could restore the initial state calling [jest.restoreAllMocks](#jestrestoreallmocks) on [afterEach](GlobalAPI.md#aftereachfn-timeout) method. +Since `jest.spyOn` is a mock, you could restore the initial state by calling [`jest.restoreAllMocks`](#jestrestoreallmocks) in the body of the callback passed to the [afterEach](GlobalAPI.md#aftereachfn-timeout) hook. ::: diff --git a/website/versioned_docs/version-28.x/GlobalAPI.md b/website/versioned_docs/version-28.x/GlobalAPI.md index 90597b94b4cf..e83413ee2dae 100644 --- a/website/versioned_docs/version-28.x/GlobalAPI.md +++ b/website/versioned_docs/version-28.x/GlobalAPI.md @@ -745,7 +745,7 @@ Use `test.failing` when you are writing a test and expecting it to fail. These t :::tip -You can use this type of tests i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. +You can use this type of test i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. It can also be a nice way to contribute failing tests to a project, even if you don't know how to fix the bug. diff --git a/website/versioned_docs/version-28.x/JestObjectAPI.md b/website/versioned_docs/version-28.x/JestObjectAPI.md index cda6fc4afc27..ba3ba3cf196c 100644 --- a/website/versioned_docs/version-28.x/JestObjectAPI.md +++ b/website/versioned_docs/version-28.x/JestObjectAPI.md @@ -469,7 +469,7 @@ console.log(returnsTrue()); // true; :::note -See [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. +See the [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. ::: @@ -489,7 +489,7 @@ By default, `jest.spyOn` also calls the **spied** method. This is different beha :::tip -Since `jest.spyOn` is a mock, you could restore the initial state calling [jest.restoreAllMocks](#jestrestoreallmocks) on [afterEach](GlobalAPI.md#aftereachfn-timeout) method. +Since `jest.spyOn` is a mock, you could restore the initial state by calling [`jest.restoreAllMocks`](#jestrestoreallmocks) in the body of the callback passed to the [afterEach](GlobalAPI.md#aftereachfn-timeout) hook. ::: diff --git a/website/versioned_docs/version-29.0/GlobalAPI.md b/website/versioned_docs/version-29.0/GlobalAPI.md index 61667e1d7571..7a29a37a7ec1 100644 --- a/website/versioned_docs/version-29.0/GlobalAPI.md +++ b/website/versioned_docs/version-29.0/GlobalAPI.md @@ -525,7 +525,7 @@ test.concurrent('subtraction 2 numbers', async () => { :::tip -Use [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. +Use the [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. ::: @@ -759,7 +759,7 @@ Use `test.failing` when you are writing a test and expecting it to fail. These t :::tip -You can use this type of tests i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. +You can use this type of test i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. It can also be a nice way to contribute failing tests to a project, even if you don't know how to fix the bug. @@ -967,7 +967,7 @@ test.todo('add should be associative'); :::tip -`test.todo` will throw an error, if you will pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. +`test.todo` will throw an error if you pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. ::: diff --git a/website/versioned_docs/version-29.0/JestObjectAPI.md b/website/versioned_docs/version-29.0/JestObjectAPI.md index 53e2758e7d8b..5e7effb653db 100644 --- a/website/versioned_docs/version-29.0/JestObjectAPI.md +++ b/website/versioned_docs/version-29.0/JestObjectAPI.md @@ -312,7 +312,7 @@ Returns the `jest` object for chaining. :::tip -Writing tests in TypeScript? Use [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. +Writing tests in TypeScript? Use the [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or the [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. ::: @@ -513,7 +513,7 @@ console.log(returnsTrue()); // true; :::tip -See [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. +See the [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. ::: @@ -533,7 +533,7 @@ By default, `jest.spyOn` also calls the **spied** method. This is different beha :::tip -Since `jest.spyOn` is a mock, you could restore the initial state calling [jest.restoreAllMocks](#jestrestoreallmocks) on [afterEach](GlobalAPI.md#aftereachfn-timeout) method. +Since `jest.spyOn` is a mock, you could restore the initial state by calling [`jest.restoreAllMocks`](#jestrestoreallmocks) in the body of the callback passed to the [afterEach](GlobalAPI.md#aftereachfn-timeout) hook. ::: diff --git a/website/versioned_docs/version-29.1/GlobalAPI.md b/website/versioned_docs/version-29.1/GlobalAPI.md index 61667e1d7571..7a29a37a7ec1 100644 --- a/website/versioned_docs/version-29.1/GlobalAPI.md +++ b/website/versioned_docs/version-29.1/GlobalAPI.md @@ -525,7 +525,7 @@ test.concurrent('subtraction 2 numbers', async () => { :::tip -Use [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. +Use the [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. ::: @@ -759,7 +759,7 @@ Use `test.failing` when you are writing a test and expecting it to fail. These t :::tip -You can use this type of tests i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. +You can use this type of test i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. It can also be a nice way to contribute failing tests to a project, even if you don't know how to fix the bug. @@ -967,7 +967,7 @@ test.todo('add should be associative'); :::tip -`test.todo` will throw an error, if you will pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. +`test.todo` will throw an error if you pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. ::: diff --git a/website/versioned_docs/version-29.1/JestObjectAPI.md b/website/versioned_docs/version-29.1/JestObjectAPI.md index 79f7a0a483f0..50c440db6f1d 100644 --- a/website/versioned_docs/version-29.1/JestObjectAPI.md +++ b/website/versioned_docs/version-29.1/JestObjectAPI.md @@ -344,7 +344,7 @@ Returns the `jest` object for chaining. :::tip -Writing tests in TypeScript? Use [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. +Writing tests in TypeScript? Use the [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or the [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. ::: @@ -586,7 +586,7 @@ console.log(returnsTrue()); // true; :::tip -See [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. +See the [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. ::: @@ -606,7 +606,7 @@ By default, `jest.spyOn` also calls the **spied** method. This is different beha :::tip -Since `jest.spyOn` is a mock, you could restore the initial state calling [jest.restoreAllMocks](#jestrestoreallmocks) on [afterEach](GlobalAPI.md#aftereachfn-timeout) method. +Since `jest.spyOn` is a mock, you could restore the initial state by calling [`jest.restoreAllMocks`](#jestrestoreallmocks) in the body of the callback passed to the [afterEach](GlobalAPI.md#aftereachfn-timeout) hook. ::: diff --git a/website/versioned_docs/version-29.2/GlobalAPI.md b/website/versioned_docs/version-29.2/GlobalAPI.md index 61667e1d7571..7a29a37a7ec1 100644 --- a/website/versioned_docs/version-29.2/GlobalAPI.md +++ b/website/versioned_docs/version-29.2/GlobalAPI.md @@ -525,7 +525,7 @@ test.concurrent('subtraction 2 numbers', async () => { :::tip -Use [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. +Use the [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. ::: @@ -759,7 +759,7 @@ Use `test.failing` when you are writing a test and expecting it to fail. These t :::tip -You can use this type of tests i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. +You can use this type of test i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. It can also be a nice way to contribute failing tests to a project, even if you don't know how to fix the bug. @@ -967,7 +967,7 @@ test.todo('add should be associative'); :::tip -`test.todo` will throw an error, if you will pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. +`test.todo` will throw an error if you pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. ::: diff --git a/website/versioned_docs/version-29.2/JestObjectAPI.md b/website/versioned_docs/version-29.2/JestObjectAPI.md index 17838d87a198..428a1900e56b 100644 --- a/website/versioned_docs/version-29.2/JestObjectAPI.md +++ b/website/versioned_docs/version-29.2/JestObjectAPI.md @@ -344,7 +344,7 @@ Returns the `jest` object for chaining. :::tip -Writing tests in TypeScript? Use [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. +Writing tests in TypeScript? Use the [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or the [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. ::: @@ -586,7 +586,7 @@ console.log(returnsTrue()); // true; :::tip -See [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. +See the [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. ::: @@ -606,7 +606,7 @@ By default, `jest.spyOn` also calls the **spied** method. This is different beha :::tip -Since `jest.spyOn` is a mock, you could restore the initial state calling [jest.restoreAllMocks](#jestrestoreallmocks) on [afterEach](GlobalAPI.md#aftereachfn-timeout) method. +Since `jest.spyOn` is a mock, you could restore the initial state by calling [`jest.restoreAllMocks`](#jestrestoreallmocks) in the body of the callback passed to the [afterEach](GlobalAPI.md#aftereachfn-timeout) hook. ::: diff --git a/website/versioned_docs/version-29.3/GlobalAPI.md b/website/versioned_docs/version-29.3/GlobalAPI.md index 61667e1d7571..7a29a37a7ec1 100644 --- a/website/versioned_docs/version-29.3/GlobalAPI.md +++ b/website/versioned_docs/version-29.3/GlobalAPI.md @@ -525,7 +525,7 @@ test.concurrent('subtraction 2 numbers', async () => { :::tip -Use [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. +Use the [`maxConcurrency`](Configuration.md/#maxconcurrency-number) configuration option to prevent Jest from executing more than the specified amount of tests at the same time. ::: @@ -759,7 +759,7 @@ Use `test.failing` when you are writing a test and expecting it to fail. These t :::tip -You can use this type of tests i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. +You can use this type of test i.e. when writing code in a BDD way. In that case the tests will not show up as failing until they pass. Then you can just remove the `failing` modifier to make them pass. It can also be a nice way to contribute failing tests to a project, even if you don't know how to fix the bug. @@ -967,7 +967,7 @@ test.todo('add should be associative'); :::tip -`test.todo` will throw an error, if you will pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. +`test.todo` will throw an error if you pass it a test callback function. Use [`test.skip`](#testskipname-fn) instead, if you already implemented the test, but do not want it to run. ::: diff --git a/website/versioned_docs/version-29.3/JestObjectAPI.md b/website/versioned_docs/version-29.3/JestObjectAPI.md index 71c39be123cc..d7957f7a04d7 100644 --- a/website/versioned_docs/version-29.3/JestObjectAPI.md +++ b/website/versioned_docs/version-29.3/JestObjectAPI.md @@ -344,7 +344,7 @@ Returns the `jest` object for chaining. :::tip -Writing tests in TypeScript? Use [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. +Writing tests in TypeScript? Use the [`jest.Mocked`](MockFunctionAPI.md/#jestmockedsource) utility type or the [`jest.mocked()`](MockFunctionAPI.md/#jestmockedsource-options) helper method to have your mocked modules typed. ::: @@ -586,7 +586,7 @@ console.log(returnsTrue()); // true; :::tip -See [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. +See the [Mock Functions](MockFunctionAPI.md#jestfnimplementation) page for details on TypeScript usage. ::: @@ -606,7 +606,7 @@ By default, `jest.spyOn` also calls the **spied** method. This is different beha :::tip -Since `jest.spyOn` is a mock, you could restore the initial state calling [jest.restoreAllMocks](#jestrestoreallmocks) on [afterEach](GlobalAPI.md#aftereachfn-timeout) method. +Since `jest.spyOn` is a mock, you could restore the initial state by calling [`jest.restoreAllMocks`](#jestrestoreallmocks) in the body of the callback passed to the [afterEach](GlobalAPI.md#aftereachfn-timeout) hook. :::