I have a nestjs service method which calls fetch and get a binary as response. I am trying to mock dependencies, first url to fetch will come from appConfig file which referes to env(‘url’).
Second Url I want to mock as it will change depending on environments
Third token will be generated on the fly that I want to mock.
Any suggestions,
Expecting any example, I tried mocking fetch with jest.mock(‘fetch’)
I tried mocking fetch call with Jest and using package jest-fetch-mock both not working,