I haven't found this anywhere and I feel like the library should handle this. I even looked at open and closed tickets but couldn't find this functionality.
I'd like to be able to have my mocked dependencies throw exceptions, for example:
const calculatorMock = Substitute.for<Calculator>();
calculatorMock.add(1, 1).throws(new Error('error message'))
Is there any reason why this is not supported?
I haven't found this anywhere and I feel like the library should handle this. I even looked at open and closed tickets but couldn't find this functionality.
I'd like to be able to have my mocked dependencies throw exceptions, for example:
Is there any reason why this is not supported?