« Bugzilla Issues Index

#1716 — Add async tests facilities

Promises are coming as part of an agreement between W3C/DOM folks and TC39. They're being used in some W3C specs and FirefoxOS implements them and want to ship them [1] very soon.
In order to avoid yet another de facto standard, we need tests. In order to have async test, we need support for async tests in the test harness. Domenic suggested a done() facility à la Mocha [2] and it feels like a good idea.

It unfolds like this:


var r = Math.random();

if(r < 0.5)
done() // test success
done(new Error('wtf')) // test failure

}, 1000);



As of 2014-Jul-17, this has landed in current -- see