Skip to content

Commit

Permalink
Add a note to the Exceptions section (jestjs#10742)
Browse files Browse the repository at this point in the history
  • Loading branch information
g13n committed Oct 30, 2020
1 parent ec89e85 commit d554eb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/UsingMatchers.md
Expand Up @@ -155,6 +155,8 @@ test('compiling android goes as expected', () => {
});
```

> Note: the function that throws an exception needs to be invoked within a wrapping function otherwise the `toThrow` assertion will fail.
## And More

This is just a taste. For a complete list of matchers, check out the [reference docs](ExpectAPI.md).
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-22.x/UsingMatchers.md
Expand Up @@ -156,6 +156,8 @@ test('compiling android goes as expected', () => {
});
```

> Note: the function that throws an exception needs to be invoked within a wrapping function otherwise the `toThrow` assertion will fail.
## And More

This is just a taste. For a complete list of matchers, check out the [reference docs](ExpectAPI.md).
Expand Down

0 comments on commit d554eb1

Please sign in to comment.