haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
668 stars 96 forks source link

Fix `throwsT` message on no exception. #272

Closed otto-gebb closed 6 years ago

otto-gebb commented 6 years ago

In case when the function provided to throwsT threw no exception a misleading assert message was shown mentioning an AssertException.

The added test would fail with the following message:

Should have failed with message containing: "Expected f to throw." but failed with " Should throw null arg. Expected f to throw an exn of type System.ArgumentNullException, but one of type Expecto.AssertException was thrown."

AnthonyLloyd commented 6 years ago

Perfect, thanks!