Skip to content

Commit 74660a5

Browse files
committed
Fix typos
1 parent ccd89a5 commit 74660a5

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

docs/api-reference.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function renderHook(
2525
Renders a test component that will call the provided `callback`, including any hooks it calls, every
2626
time it renders.
2727

28-
The `renderHook` function accept the following arguments:
28+
The `renderHook` function accepts the following arguments:
2929

3030
### `callback`
3131

@@ -42,7 +42,7 @@ An options object to modify the execution of the `callback` function. See the
4242

4343
## `renderHook` Options
4444

45-
The `renderHook` function accepts the following options as the second parameter:
45+
The `renderHook` method accepts the following options as the second parameter:
4646

4747
### `initialProps`
4848

@@ -55,7 +55,7 @@ providers from `React.createContext` for the hook to access with `useContext`.
5555

5656
## `renderHook` Result
5757

58-
The `renderHook` method returns an object that has a following properties:
58+
The `renderHook` method returns an object that has the following properties:
5959

6060
### `result`
6161

@@ -76,7 +76,7 @@ function waitForNextUpdate(): Promise<void>
7676
```
7777

7878
- `waitForNextUpdate` (`function`) - returns a `Promise` that resolves the next time the hook
79-
renders, commonly when state is updated as the result of a asynchronous action
79+
renders, commonly when state is updated as the result of an asynchronous action.
8080

8181
### `rerender`
8282

@@ -85,8 +85,7 @@ function rerender(newProps?: any): void
8585
```
8686

8787
A function to rerender the test component, causing any hooks to be recalculated. If `newProps` are
88-
passed, the will replace the `initialProps` passed to the `callback` function for the rerender any
89-
subsequent renders.
88+
passed, they will replace the `callback` function's `initialProps` for subsequent rerenders.
9089

9190
### `unmount`
9291

docs/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ the results.
5353

5454
### When not to use this library
5555

56-
1. Your hook is defined along side a component and is only used there
56+
1. Your hook is defined alongside a component and is only used there
5757
2. Your hook is easy to test by just testing the components using it
5858

5959
## Installation
@@ -83,5 +83,5 @@ npm install --save-dev react-test-renderer@^16.9.0
8383
## Testing Framework
8484

8585
In order to run tests, you will probably want to be using a test framework. If you have not already
86-
got one, we recommend using [jest](https://jestjs.io/), but this library should work without issues
86+
got one, we recommend using [Jest](https://jestjs.io/), but this library should work without issues
8787
with any of the alternatives.

test/autoCleanup.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useEffect } from 'react'
22
import { renderHook } from 'src'
33

44
// This verifies that by importing RHTL in an
5-
// environment which supports afterEach (like jest)
5+
// environment which supports afterEach (like Jest)
66
// we'll get automatic cleanup between tests.
77
describe('auto cleanup tests', () => {
88
let cleanupCalled = false

0 commit comments

Comments
 (0)