From 5ba7dbc31e4c7880443f474f4c2f9c45fb254a77 Mon Sep 17 00:00:00 2001 From: HairyMaclary Date: Tue, 30 May 2017 22:14:20 +1200 Subject: [PATCH] Delete confusing async keyword (#3679) Async is used is only used in one of two similar promise examples. It threw me off. --- docs/en/TestingAsyncCode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/TestingAsyncCode.md b/docs/en/TestingAsyncCode.md index afc686c6f809..f0518cd90b53 100644 --- a/docs/en/TestingAsyncCode.md +++ b/docs/en/TestingAsyncCode.md @@ -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')