You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works... But that kinda defeats the purpose of the baseURL property. Well, it works on the code so that's not too bad, but why is it not working on testing too?
@developersoul I've been trying to do the same with Jest spies and mock functionality (after reading your post) and have successfully tested everything without Moxios. Thank you.
For context, I'm using TypeScript, React and Jest with Enzyme.
On my application I'm doing something like this:
And I'm trying to stub the
/token
request like this:The
console.log(response);
should output my mocked response, but it's not. However, if I change thestubRequest
call to:It works... But that kinda defeats the purpose of the
baseURL
property. Well, it works on the code so that's not too bad, but why is it not working on testing too?I've tried I've also tried this:
But it didn't work...
What am I missing?
The text was updated successfully, but these errors were encountered: