cspray/assert-throws

Allow ability to assert some callback triggers an error

Opened this issue · 0 comments

Like asserting that an exception is thrown, it might be useful that a given code triggers some expected error that shouldn't be transformed into a thrown exception. Similar to assertThrows we could implement an assertTriggers. This would be a slightly more complex implementation as we would need to interact with the global error handler and ensure that our error trapping handler only operates within the confines our of our callback.