ts-jest-mock-examples icon indicating copy to clipboard operation
ts-jest-mock-examples copied to clipboard

If possible to mock an interface using ts-jest/utils

Open hantsy opened this issue 4 years ago • 0 comments

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.

hantsy avatar Dec 31 '20 04:12 hantsy