Skip to content

Commit

Permalink
Grammar correction
Browse files Browse the repository at this point in the history
Simple grammar change to the description of `jest.restoreAllMocks()`
  • Loading branch information
saylerb committed May 3, 2019
1 parent d387bcf commit 469d438
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/JestObjectAPI.md
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/MockFunctionAPI.md
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion packages/jest-environment/src/index.ts
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-22.x/JestObjectAPI.md
Expand Up @@ -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()`

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-22.x/MockFunctionAPI.md
Expand Up @@ -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)`

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-23.x/JestObjectAPI.md
Expand Up @@ -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()`

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-23.x/MockFunctionAPI.md
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-24.0/JestObjectAPI.md
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-24.0/MockFunctionAPI.md
Expand Up @@ -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.

Expand Down

0 comments on commit 469d438

Please sign in to comment.