ts-jest-mock-examples
ts-jest-mock-examples copied to clipboard
If possible to mock an interface using ts-jest/utils
Assume there is a MyService class that depends on the MyRepository interface.
When testing the MyService, if possible to mock the dependencies.
I have tried jest-mock-extended and ts-mockito, both worked. Not sure there is an approach with this simple ts-jest utils.