sarahsporck / Migration-Test-Repository

This repository is used to test the ticket migration from jira to github
0 stars 1 forks source link

IGAPP-630: Remove ts-ignores for mock functions #3296

Closed jira-to-github-migrator-test[bot] closed 1 year ago

jira-to-github-migrator-test[bot] commented 1 year ago

Steffen Kleinle - 12.5.2021, 12:04:39

We have lots of ts-ignore commands in our tests suppressing ts errors because it does not know that these functions are mocks. Replace all of those ts-ignores for mocked functions in our tests with the following (or if you can come up with a better) workaround:

mockedFunction as unknown as jest.Mock<(json: JsonCategoryType, basePath: string) => CategoryModel>

Environment: - Linked issues: