Cancel a vanilla ECMAScript 6 Promise chain
问题 Is there a method for clearing the .then s of a JavaScript Promise instance? I\'ve written a JavaScript test framework on top of QUnit. The framework runs tests synchronously by running each one in a Promise . (Sorry for the length of this code block. I commented it as best I can, so it feels less tedious.) /* Promise extension -- used for easily making an async step with a timeout without the Promise knowing anything about the function it\'s waiting on */ $$.extend(Promise, { asyncTimeout: