From ddb0c26e7bb7ac47f41894a193194293d57c21ae Mon Sep 17 00:00:00 2001 From: Pavel Chertorogov Date: Wed, 19 Sep 2018 16:11:46 +0600 Subject: [PATCH] docs: fix `rejects.toMatch` on `rejects.toThrow` According to https://github.com/facebook/jest/pull/4884 --- docs/TestingAsyncCode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/TestingAsyncCode.md b/docs/TestingAsyncCode.md index 030d50019880..3d795a014810 100644 --- a/docs/TestingAsyncCode.md +++ b/docs/TestingAsyncCode.md @@ -120,7 +120,7 @@ test('the data is peanut butter', async () => { test('the fetch fails with an error', async () => { expect.assertions(1); - await expect(fetchData()).rejects.toMatch('error'); + await expect(fetchData()).rejects.toThrow('error'); }); ```