Merge pull request #33563 from sameoldmadness/make-sinon-bluebird-friendly

Sinon: replace Bluebird with PromiseLike object
This commit is contained in:
Nathan Shively-Sanders
2019-03-04 08:36:18 -08:00
committed by GitHub
+1 -2
View File
@@ -1,5 +1,4 @@
import sinon = require("sinon");
import Bluebird = require("bluebird");
function testSandbox() {
const obj = {};
@@ -427,7 +426,7 @@ function testStub() {
const obj = class {
foo() { }
promiseFunc() { return Promise.resolve('foo'); }
promiseLikeFunc() { return {} as any as Bluebird<string>; }
promiseLikeFunc() { return Promise.resolve('foo') as PromiseLike<string>; }
};
const instance = new obj();