Skip to content

Commit

Permalink
docs: changed toThrow to toThrowError (#2217)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnetCarpenter committed Oct 27, 2022
1 parent 576d791 commit 8ac3d47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/index.md
Expand Up @@ -393,7 +393,7 @@ When you use `test` or `bench` in the top level of file, they are collected as p
describe('numberToCurrency', () => {
describe('given an invalid number', () => {
test('composed of non-numbers to throw error', () => {
expect(() => numberToCurrency('abc')).toThrow()
expect(() => numberToCurrency('abc')).toThrowError()
})
})

Expand Down Expand Up @@ -868,7 +868,7 @@ When you use `test` or `bench` in the top level of file, they are collected as p
```

:::warning
A _deep equality_ will not be performed for `Error` objects. To test if something was thrown, use [`toThrow`](#tothrow) assertion.
A _deep equality_ will not be performed for `Error` objects. To test if something was thrown, use [`toThrowError`](#tothrowerror) assertion.
:::

### toStrictEqual
Expand Down

0 comments on commit 8ac3d47

Please sign in to comment.