I ran into an issue where I forgot to resolve my promise, leaving the remainder of the chain waiting (Forever). Thankfully in my case I was able to track down the issue in only 10 or so minutes, but I could see this being a really big pain in the butt if I don't figure out some way to check for orphaned promise chains.
How would you automate checking for the following error?
function myAsyncFunction(){
return new Promise((resolve,reject)=>{
//do stuff here, but forget to call resolve();
});
}
new Promise()
object creations in a derived class that, at devTime, tests for long-running chains (usingPromise.timeout
) because at least in my situation promises that take longer than 30 seconds is bad. – JasonS Jan 31 '17 at 18:02