Skip to content

Commit

Permalink
Fixing minor typo in the example code where the example should be usi…
Browse files Browse the repository at this point in the history
…ng ToMatch not ToThrow (#11205)
  • Loading branch information
GregEisenberg committed Mar 17, 2021
1 parent 990d9b9 commit 4810f74
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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 () => {
await expect(fetchData()).rejects.toThrow('error');
await expect(fetchData()).rejects.toMatch('error');
});
```

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-25.x/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 () => {
await expect(fetchData()).rejects.toThrow('error');
await expect(fetchData()).rejects.toMatch('error');
});
```

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-26.x/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 () => {
await expect(fetchData()).rejects.toThrow('error');
await expect(fetchData()).rejects.toMatch'error');
});
```

Expand Down

0 comments on commit 4810f74

Please sign in to comment.