Skip to content

Commit

Permalink
Fix tiny typo
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver.phillips committed May 28, 2019
1 parent 27ba635 commit 75c8753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ test("Async code", () => {

You may have noticed another component on the page. This one takes some text input, then submits it to a [Node server](https://github.com/oliverjam/micro-marked) that converts Markdown to HTML. It then renders the HTML to the page.

Testing this component is going to be a little trickier because of that network request. First we need to consider that our DOM is going to get updated asynchronously because React will wait for the API call to finish befor rendering. React Testing Library exposes [`findByText`](https://testing-library.com/docs/api-queries#findby). You can use this when you need to wait for an element to appear. There are `findBy*` variants for all the `getBy*` methods.
Testing this component is going to be a little trickier because of that network request. First we need to consider that our DOM is going to get updated asynchronously because React will wait for the API call to finish before rendering. React Testing Library exposes [`findByText`](https://testing-library.com/docs/api-queries#findby). You can use this when you need to wait for an element to appear. There are `findBy*` variants for all the `getBy*` methods.

#### Mocks

Expand Down

0 comments on commit 75c8753

Please sign in to comment.