NagRock / ts-mockito

Mocking library for TypeScript
MIT License
977 stars 93 forks source link

Feature request: fail when stub is called with arguments not maching any configured call. #159

Open gpg0 opened 5 years ago

gpg0 commented 5 years ago

Currently, when I call a stub instance passing parameters which do not match any previously configured call, that call returns null. It would be very useful if such a call would throw an error such as UnexpectedStubCall with details about the arguments mismatch.

This would be a breaking change, so it would probably need to be configured or used through a slightly different API.

What do you think about this?