From 469d4383796d70ca643602a63d6ed000800121f9 Mon Sep 17 00:00:00 2001 From: Brian Sayler Date: Tue, 30 Apr 2019 13:05:18 -0500 Subject: [PATCH] Grammar correction Simple grammar change to the description of `jest.restoreAllMocks()` --- docs/JestObjectAPI.md | 2 +- docs/MockFunctionAPI.md | 2 +- packages/jest-environment/src/index.ts | 2 +- website/versioned_docs/version-22.x/JestObjectAPI.md | 2 +- website/versioned_docs/version-22.x/MockFunctionAPI.md | 2 +- website/versioned_docs/version-23.x/JestObjectAPI.md | 2 +- website/versioned_docs/version-23.x/MockFunctionAPI.md | 2 +- website/versioned_docs/version-24.0/JestObjectAPI.md | 2 +- website/versioned_docs/version-24.0/MockFunctionAPI.md | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index 1a6cb5afe945..9a1e653014fc 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -497,7 +497,7 @@ Returns the `jest` object for chaining. ### `jest.restoreAllMocks()` -Restores all mocks back to their original value. Equivalent to calling [`.mockRestore()`](MockFunctionAPI.md#mockfnmockrestore) on every mocked function. Beware that `jest.restoreAllMocks()` only works when mock was created with `jest.spyOn`; other mocks will require you to manually restore them. +Restores all mocks back to their original value. Equivalent to calling [`.mockRestore()`](MockFunctionAPI.md#mockfnmockrestore) on every mocked function. Beware that `jest.restoreAllMocks()` only works when the mock was created with `jest.spyOn`; other mocks will require you to manually restore them. ## Mock timers diff --git a/docs/MockFunctionAPI.md b/docs/MockFunctionAPI.md index 199d7a797175..05d434043946 100644 --- a/docs/MockFunctionAPI.md +++ b/docs/MockFunctionAPI.md @@ -98,7 +98,7 @@ Does everything that [`mockFn.mockReset()`](#mockfnmockreset) does, and also res This is useful when you want to mock functions in certain test cases and restore the original implementation in others. -Beware that `mockFn.mockRestore` only works when mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`. +Beware that `mockFn.mockRestore` only works when the mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`. The [`restoreMocks`](configuration.html#restoremocks-boolean) configuration option is available to restore mocks automatically between tests. diff --git a/packages/jest-environment/src/index.ts b/packages/jest-environment/src/index.ts index b49313c47d76..605227977271 100644 --- a/packages/jest-environment/src/index.ts +++ b/packages/jest-environment/src/index.ts @@ -156,7 +156,7 @@ export interface Jest { * Restores all mocks back to their original value. Equivalent to calling * `.mockRestore` on every mocked function. * - * Beware that jest.restoreAllMocks() only works when mock was created with + * Beware that jest.restoreAllMocks() only works when the mock was created with * jest.spyOn; other mocks will require you to manually restore them. */ restoreAllMocks(): Jest; diff --git a/website/versioned_docs/version-22.x/JestObjectAPI.md b/website/versioned_docs/version-22.x/JestObjectAPI.md index 9d57aab4562d..7493f2c70715 100644 --- a/website/versioned_docs/version-22.x/JestObjectAPI.md +++ b/website/versioned_docs/version-22.x/JestObjectAPI.md @@ -373,7 +373,7 @@ Returns the `jest` object for chaining. ### `jest.restoreAllMocks()` -Restores all mocks back to their original value. Equivalent to calling `.mockRestore` on every mocked function. Beware that `jest.restoreAllMocks()` only works when mock was created with `jest.spyOn`; other mocks will require you to manually restore them. +Restores all mocks back to their original value. Equivalent to calling `.mockRestore` on every mocked function. Beware that `jest.restoreAllMocks()` only works when the mock was created with `jest.spyOn`; other mocks will require you to manually restore them. ### `jest.resetModules()` diff --git a/website/versioned_docs/version-22.x/MockFunctionAPI.md b/website/versioned_docs/version-22.x/MockFunctionAPI.md index 8ab8ced6dfe5..1996248bbf9c 100644 --- a/website/versioned_docs/version-22.x/MockFunctionAPI.md +++ b/website/versioned_docs/version-22.x/MockFunctionAPI.md @@ -68,7 +68,7 @@ Removes the mock and restores the initial implementation. This is useful when you want to mock functions in certain test cases and restore the original implementation in others. -Beware that `mockFn.mockRestore` only works when mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`. +Beware that `mockFn.mockRestore` only works when the mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`. ### `mockFn.mockImplementation(fn)` diff --git a/website/versioned_docs/version-23.x/JestObjectAPI.md b/website/versioned_docs/version-23.x/JestObjectAPI.md index a32bac460849..8ad63e3a6f27 100644 --- a/website/versioned_docs/version-23.x/JestObjectAPI.md +++ b/website/versioned_docs/version-23.x/JestObjectAPI.md @@ -374,7 +374,7 @@ Returns the `jest` object for chaining. ### `jest.restoreAllMocks()` -Restores all mocks back to their original value. Equivalent to calling [`.mockRestore()`](MockFunctionAPI.md#mockfnmockrestore) on every mocked function. Beware that `jest.restoreAllMocks()` only works when mock was created with `jest.spyOn`; other mocks will require you to manually restore them. +Restores all mocks back to their original value. Equivalent to calling [`.mockRestore()`](MockFunctionAPI.md#mockfnmockrestore) on every mocked function. Beware that `jest.restoreAllMocks()` only works when the mock was created with `jest.spyOn`; other mocks will require you to manually restore them. ### `jest.resetModules()` diff --git a/website/versioned_docs/version-23.x/MockFunctionAPI.md b/website/versioned_docs/version-23.x/MockFunctionAPI.md index e675553a6b23..be9e083403fa 100644 --- a/website/versioned_docs/version-23.x/MockFunctionAPI.md +++ b/website/versioned_docs/version-23.x/MockFunctionAPI.md @@ -93,7 +93,7 @@ Does everything that [`mockFn.mockReset()`](#mockfnmockreset) does, and also res This is useful when you want to mock functions in certain test cases and restore the original implementation in others. -Beware that `mockFn.mockRestore` only works when mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`. +Beware that `mockFn.mockRestore` only works when the mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`. The [`restoreMocks`](configuration.html#restoremocks-boolean) configuration option is available to restore mocks automatically between tests. diff --git a/website/versioned_docs/version-24.0/JestObjectAPI.md b/website/versioned_docs/version-24.0/JestObjectAPI.md index ca754af8600e..d72a664f9d61 100644 --- a/website/versioned_docs/version-24.0/JestObjectAPI.md +++ b/website/versioned_docs/version-24.0/JestObjectAPI.md @@ -498,7 +498,7 @@ Returns the `jest` object for chaining. ### `jest.restoreAllMocks()` -Restores all mocks back to their original value. Equivalent to calling [`.mockRestore()`](MockFunctionAPI.md#mockfnmockrestore) on every mocked function. Beware that `jest.restoreAllMocks()` only works when mock was created with `jest.spyOn`; other mocks will require you to manually restore them. +Restores all mocks back to their original value. Equivalent to calling [`.mockRestore()`](MockFunctionAPI.md#mockfnmockrestore) on every mocked function. Beware that `jest.restoreAllMocks()` only works when the mock was created with `jest.spyOn`; other mocks will require you to manually restore them. ## Mock timers diff --git a/website/versioned_docs/version-24.0/MockFunctionAPI.md b/website/versioned_docs/version-24.0/MockFunctionAPI.md index 8fdb075b979b..1f1e354701ac 100644 --- a/website/versioned_docs/version-24.0/MockFunctionAPI.md +++ b/website/versioned_docs/version-24.0/MockFunctionAPI.md @@ -99,7 +99,7 @@ Does everything that [`mockFn.mockReset()`](#mockfnmockreset) does, and also res This is useful when you want to mock functions in certain test cases and restore the original implementation in others. -Beware that `mockFn.mockRestore` only works when mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`. +Beware that `mockFn.mockRestore` only works when the mock was created with `jest.spyOn`. Thus you have to take care of restoration yourself when manually assigning `jest.fn()`. The [`restoreMocks`](configuration.html#restoremocks-boolean) configuration option is available to restore mocks automatically between tests.