Created
July 5, 2018 18:41
-
-
Save mdlavin/373bf7470e3f342a91ab94d7c9f55d29 to your computer and use it in GitHub Desktop.
An example application that terminates without error earlier than expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function someAsyncFunction () { | |
return new Promise(function () { | |
// This is a bad promise that never resolves | |
}); | |
} | |
someAsyncFunction() | |
.then(function () { | |
console.log('Done'); | |
}) | |
.catch(function (e) { | |
console.log('Error'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment