Skip to content

Commit

Permalink
Delete confusing async keyword (#3679)
Browse files Browse the repository at this point in the history
Async is used is only used in one of two similar promise examples. It threw me off.
  • Loading branch information
HairyMaclary authored and cpojer committed May 30, 2017
1 parent 2939c36 commit 5ba7dbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/en/TestingAsyncCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Be sure to return the promise - if you omit this `return` statement, your test w
If you expect a promise to be rejected use the `.catch` method. Make sure to add `expect.assertions` to verify that a certain number of assertions are called. Otherwise a fulfilled promise would not fail the test.

```js
test('the fetch fails with an error', async () => {
test('the fetch fails with an error', () => {
expect.assertions(1);
return fetchData().catch(e =>
expect(e).toMatch('error')
Expand Down

0 comments on commit 5ba7dbc

Please sign in to comment.