domenic / promises-unwrapping

The ES6 promises spec, as per September 2013 TC39 meeting
1.23k stars 94 forks source link

Missing "done" parameter in test/race.js #102

Closed anba closed 10 years ago

anba commented 10 years ago

The third test case in test/race.js ("should settle in the same way as the first promise to settle") does not declare the done parameter.

cscott commented 10 years ago

That's a hazard of the clever way mocha tries to handle synchronous and asynchronous tests, and is made worse (sorry, @domenic) by the way it now magically handles Promise return values as well. it's easy to forget to declare done and/or return your Promise.

In case it helps, this is the "safety net" I built for prfun to prevent this class of mistakes: https://github.com/cscott/prfun/commit/d204abb73d9453f25651e01d7a66f2a15d43dbde