diff --git a/bluebird/bluebird-tests.ts b/bluebird/bluebird-tests.ts index abbdf6ee2..9244a9da3 100644 --- a/bluebird/bluebird-tests.ts +++ b/bluebird/bluebird-tests.ts @@ -696,6 +696,15 @@ fooProm = Promise.try(() => { return fooThen; }, arr, x); +// - - - - - - - - - - - - - - - - - + +fooProm = Promise.try(() => { + if (fooProm) { + return fooProm; + } + return foo; +}); + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - fooProm = Promise.attempt(() => { @@ -710,6 +719,15 @@ fooProm = Promise.attempt(() => { // - - - - - - - - - - - - - - - - - +fooProm = Promise.attempt(() => { + if (fooProm) { + return fooProm; + } + return foo; +}); + +// - - - - - - - - - - - - - - - - - + fooProm = Promise.attempt(() => { return fooThen; });