Skip to content

Commit

Permalink
docs: fix rejects.toMatch on rejects.toThrow
Browse files Browse the repository at this point in the history
According to jestjs#4884
  • Loading branch information
nodkz authored Sep 19, 2018
1 parent c3dc90f commit ddb0c26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/TestingAsyncCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
```

Expand Down

0 comments on commit ddb0c26

Please sign in to comment.