Skip to content

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

@hantsy

Description

@hantsy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions