ValeriaVG / tiny-jest

Minimalistic zero dependency Jest-like test library to run tests in browser, nodejs or deno
16 stars 1 forks source link

missing function toThrow() #1

Closed GeorgGerber closed 3 years ago

GeorgGerber commented 3 years ago

The idea for a tiny jest-like module is great, I want to use it. But an important function of jest is expect(....).toThrow() in order to check usecases, in wich the testee runs into an exception.

ValeriaVG commented 3 years ago

I agree, @GeorgGerber , this is an essential part and should definitely be added to the package. Do you think it'll be sufficient for now to cover the following use cases?

expect(someFunction).toThrow()
expect(someFunction).toThrow(/^Regular Expression/)