Added a few relevant tests.

This commit is contained in:
Daniel Rosenwasser
2016-02-03 11:28:27 -08:00
parent 290a1d7ee6
commit 132599cf88
+18
View File
@@ -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;
});