DEV Community

Discussion on: How to test exceptions in Jest

Collapse
 
sargalias profile image
Spyros Argalias • Edited

Nice.

Just want to chip in to say we can skip the wrapping of the function like so:

expect(doSomething).toThrow()

(if we don't need to provide additional arguments)