I tried events approach, but it didn't work. And I tried to use done callback, but I can't pass the unit tests - "Cannot set headers after they are sent to the client"
Also, I don't know about creating new unit tests because mocked client is used, requests will be correct even without this fix
I tried
events
approach, but it didn't work. And I tried to usedone
callback, but I can't pass the unit tests - "Cannot set headers after they are sent to the client" Also, I don't know about creating new unit tests because mocked client is used, requests will be correct even without this fix