取消香草ECMAScript 6 Promise链
是否有清除.thenJavaScript Promise实例的方法? 我已经在QUnit之上编写了一个JavaScript测试框架。该框架通过在.NET中运行每个测试来同步运行测试Promise。(很抱歉,此代码块的长度。我已尽我所能对其进行了评论,因此它不那么乏味。) /* 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: function (timeToLive, errorMessage) { var error = new Error(errorMessage || "Operation timed out."); var res, // resolve() rej, …