ts-mockito
ts-mockito copied to clipboard
Feature request: Allow overlapping matchers
trafficstars
It seems like overlapping matchers end up raising an error. It would be helpful if matchers could simply take precedence over each other, e.g. according to the order in which they are specified.
This could allow specifying default (non-null) behavior for a function as well as a different result for specific inputs.
This would make it easy to effectively implement https://github.com/TypeStrong/ts-mockito/issues/41 on my own.
Can you provide a code sample of what you expect and what is not working as expected?