How can I use this mock in multiple places using __mocks_folder using Jest and Typescript
I have a mock which I define in a test. I find I need to use that mock again and again. I tried using the manual __mocks__
folder but don’t know to get it to work. When I using it directly in the test file it works perfectly. However, I don’t want to copy and paste again and again and I have more complex tests which use many mocks.
Mocking an named export in Jest throws TypeError: …is not a function
I have an IconFactory.ts which doesn’t have a default export: