File tree Expand file tree Collapse file tree 5 files changed +12
-14
lines changed Expand file tree Collapse file tree 5 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ merge of your pull request!
3333
3434<!--
3535To check an item, place an "x" in the box like so: "- [x] Documentation"
36- Remove any items that are relevant to your changes
36+ Remove items that are irrelevant to your changes.
3737-->
3838
3939- [ ] Documentation updated
Original file line number Diff line number Diff line change 11# Contributing
22
3- Thanks for wanting to make contribution and wanting to improve this library for everyone!
3+ Thanks for wanting to make a contribution and wanting to improve this library for everyone!
44
55## Project setup
66
@@ -29,12 +29,11 @@ Please make sure to run the tests before you commit your changes. You can do so
2929
3030### Update Typings
3131
32- The TypeScript type definitions are in the
33- [ DefinitelyTyped repo] ( https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__react-hooks )
32+ The TypeScript type definitions can be found in the [ DefinitelyTyped repo] ( https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__react-hooks ) .
3433
3534## Help needed
3635
37- Please checkout the
38- [ the open issues] ( https://github.com/testing-library/react-hooks-testing-library/issues )
36+ Please check out the
37+ [ the open issues] ( https://github.com/testing-library/react-hooks-testing-library/issues ) .
3938
4039Also, please watch the repo and respond to questions/bug reports/feature requests! Thanks!
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function renderHook(
2525Renders a test component that will call the provided `callback`, including any hooks it calls, every
2626time it renders.
2727
28- The `renderHook` function accept the following arguments:
28+ The `renderHook` function accepts the following arguments:
2929
3030### `callback`
3131
@@ -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` function 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
8787A 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
Original file line number Diff line number Diff 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
57572 . 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
8585In 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
8787with any of the alternatives.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { useEffect } from 'react'
22import { 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.
77describe ( 'auto cleanup tests' , ( ) => {
88 let cleanupCalled = false
You can’t perform that action at this time.
0 commit comments