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
However, the api/users route makes a Database call. How would I use sinon to stub this method (replaceUserOnDuplicate) so that it returns a dummy response (like 0, or anything)?
Is it possible? I'm looking at the Chai-HTTP syntax and I see no room to insert any Sinon stubbed methods.
Thanks for your help!
The text was updated successfully, but these errors were encountered:
Here is the route I want to test:
I can use chai-http to do something like this (psuedo-code):
However, the api/users route makes a Database call. How would I use sinon to stub this method (replaceUserOnDuplicate) so that it returns a dummy response (like 0, or anything)?
Is it possible? I'm looking at the Chai-HTTP syntax and I see no room to insert any Sinon stubbed methods.
Thanks for your help!
The text was updated successfully, but these errors were encountered: