Description
Hello,
We are currently evaluating multiple options for unit testing in our NodeJS backend. Since I am coming from Java / SpringBoot background I naturally prepared a PR to showcase how cool it is to develop mocks with the mockito syntax.
In general a lot of use cases are already supported. It would be nice to have less ambiguous error messages if something goes wrong with setting up mocks while writing tests for example. I remember that for Java there is some kind of strict stubbing: you would get an error if there is a message called which is not mocked - or vice-versa when you would mock a method that is not called in the test execution. It does not have to go so much into detail. but any way of more specific error messages would be awesome.
Here is an example:
So since the mocked method (in src file line: 100) is not working when you adjust a parameter it will just be null, and of course fail because we run .catch() on it in the code. It would be nice to get an actual insight that shows the difference in the mocked parameters: expected param: ip; actual: ip + 'thisIsNotMockedForSure' for method call ... .
Thank you in advance for any feedback 👍
Best regards,
Martin