diff --git a/docs/MockFunctionAPI.md b/docs/MockFunctionAPI.md index 45771b067459..8e55737147d8 100644 --- a/docs/MockFunctionAPI.md +++ b/docs/MockFunctionAPI.md @@ -286,7 +286,7 @@ Received number of calls: 0 ### `mockFn.mockReturnThis()` -Syntactic sugar function for: +Shorthand for: ```js jest.fn(function () { @@ -350,7 +350,7 @@ mockFn(); // 'default' ### `mockFn.mockResolvedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.resolve(value)); @@ -376,7 +376,7 @@ test('async test', async () => { ### `mockFn.mockResolvedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.resolve(value)); @@ -416,7 +416,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.reject(value)); @@ -446,7 +446,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.reject(value)); diff --git a/website/versioned_docs/version-25.x/MockFunctionAPI.md b/website/versioned_docs/version-25.x/MockFunctionAPI.md index 4fbb5f0f3632..e886053bb885 100644 --- a/website/versioned_docs/version-25.x/MockFunctionAPI.md +++ b/website/versioned_docs/version-25.x/MockFunctionAPI.md @@ -200,7 +200,7 @@ Received number of calls: 0 ### `mockFn.mockReturnThis()` -Syntactic sugar function for: +Shorthand for: ```js jest.fn(function () { @@ -237,7 +237,7 @@ console.log(myMockFn(), myMockFn(), myMockFn(), myMockFn()); ### `mockFn.mockResolvedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.resolve(value)); @@ -255,7 +255,7 @@ test('async test', async () => { ### `mockFn.mockResolvedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.resolve(value)); @@ -280,7 +280,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.reject(value)); @@ -298,7 +298,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.reject(value)); diff --git a/website/versioned_docs/version-26.x/MockFunctionAPI.md b/website/versioned_docs/version-26.x/MockFunctionAPI.md index 4fbb5f0f3632..e886053bb885 100644 --- a/website/versioned_docs/version-26.x/MockFunctionAPI.md +++ b/website/versioned_docs/version-26.x/MockFunctionAPI.md @@ -200,7 +200,7 @@ Received number of calls: 0 ### `mockFn.mockReturnThis()` -Syntactic sugar function for: +Shorthand for: ```js jest.fn(function () { @@ -237,7 +237,7 @@ console.log(myMockFn(), myMockFn(), myMockFn(), myMockFn()); ### `mockFn.mockResolvedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.resolve(value)); @@ -255,7 +255,7 @@ test('async test', async () => { ### `mockFn.mockResolvedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.resolve(value)); @@ -280,7 +280,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.reject(value)); @@ -298,7 +298,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.reject(value)); diff --git a/website/versioned_docs/version-27.x/MockFunctionAPI.md b/website/versioned_docs/version-27.x/MockFunctionAPI.md index d9e36a559570..bd2478b98bcd 100644 --- a/website/versioned_docs/version-27.x/MockFunctionAPI.md +++ b/website/versioned_docs/version-27.x/MockFunctionAPI.md @@ -210,7 +210,7 @@ Received number of calls: 0 ### `mockFn.mockReturnThis()` -Syntactic sugar function for: +Shorthand for: ```js jest.fn(function () { @@ -247,7 +247,7 @@ console.log(myMockFn(), myMockFn(), myMockFn(), myMockFn()); ### `mockFn.mockResolvedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.resolve(value)); @@ -265,7 +265,7 @@ test('async test', async () => { ### `mockFn.mockResolvedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.resolve(value)); @@ -290,7 +290,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.reject(value)); @@ -308,7 +308,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.reject(value)); diff --git a/website/versioned_docs/version-28.x/MockFunctionAPI.md b/website/versioned_docs/version-28.x/MockFunctionAPI.md index d33f5a7bded0..5a02bb5efc49 100644 --- a/website/versioned_docs/version-28.x/MockFunctionAPI.md +++ b/website/versioned_docs/version-28.x/MockFunctionAPI.md @@ -286,7 +286,7 @@ Received number of calls: 0 ### `mockFn.mockReturnThis()` -Syntactic sugar function for: +Shorthand for: ```js jest.fn(function () { @@ -350,7 +350,7 @@ mockFn(); // 'default' ### `mockFn.mockResolvedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.resolve(value)); @@ -376,7 +376,7 @@ test('async test', async () => { ### `mockFn.mockResolvedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.resolve(value)); @@ -416,7 +416,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.reject(value)); @@ -446,7 +446,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.reject(value)); diff --git a/website/versioned_docs/version-29.0/MockFunctionAPI.md b/website/versioned_docs/version-29.0/MockFunctionAPI.md index 4fdff1f8adca..411d8111869d 100644 --- a/website/versioned_docs/version-29.0/MockFunctionAPI.md +++ b/website/versioned_docs/version-29.0/MockFunctionAPI.md @@ -286,7 +286,7 @@ Received number of calls: 0 ### `mockFn.mockReturnThis()` -Syntactic sugar function for: +Shorthand for: ```js jest.fn(function () { @@ -350,7 +350,7 @@ mockFn(); // 'default' ### `mockFn.mockResolvedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.resolve(value)); @@ -376,7 +376,7 @@ test('async test', async () => { ### `mockFn.mockResolvedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.resolve(value)); @@ -416,7 +416,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValue(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementation(() => Promise.reject(value)); @@ -446,7 +446,7 @@ test('async test', async () => { ### `mockFn.mockRejectedValueOnce(value)` -Syntactic sugar function for: +Shorthand for: ```js jest.fn().mockImplementationOnce(() => Promise.reject(value));