Closed
Description
Hello,
I'm trying to stub request-promise using sinon, however could not find a way yet on how to do that.
Back when i was using request itself, it looked something like this:
before(function (done) {
sinon.stub(request, 'get').yields(null, { statusCode: 200 }, fs.readFileSync(__dirname + '/data/' + filename));
done();
});
after(function (done) {
request.get.restore();
done();
});
}
Any suggestions on how to do this with promise-request?
Feel free to close this issue if it doesn't fit in here.
Metadata
Assignees
Labels
No labels
Activity