We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried my code
let stubFetch; const fetch = require("node-fetch-commonjs"); stubFetch = sinon.stub(fetch, "default"); stubFetch.returns(Promise.resolve(new Response(undefined, { status: 200 }))); stubFetch.restore();
it doesn't work.
how to stub your code?
The text was updated successfully, but these errors were encountered:
I haven't worked with sinon yet, but if you get an error or something I think that might be helpful.
After looking at the documentation of sinonjs and the code of node-fetch rq I have two things in mind that could be tried:
sinon.stub(fetch, "fetch");
sinon.stub(fetch);
Sorry, something went wrong.
No branches or pull requests
I tried my code
it doesn't work.
how to stub your code?
The text was updated successfully, but these errors were encountered: