Isn't there is a `toThrow` expectation you can use?