expect icon indicating copy to clipboard operation
expect copied to clipboard

Allow to match the error type in toThrow()

Open rherrmann opened this issue 2 years ago • 0 comments

I would like to be able to assert the type of an error that is thrown with expect(...).toThrow(). For example:

expect(() => rgbColor(255, 255, 999)).toThrow(RangeError);

rherrmann avatar Mar 15 '22 11:03 rherrmann