The following code demonstrates that Promise.all() never resolves:
Promise.all()
var p1 = Promise.resolve(1).then(function () { console.log('p1'); }); var p2 = Promise.resolve(2).then(function () { console.log('p2'); }); var all = Promise.all([p1, p2]).then(function () { console.log('done'); }).catch(function () { console.log('FAIL'); }); console.log('Promise test');
The output is:
p1 p2 > Promise test =undefined
@Drarok started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The following code demonstrates that
Promise.all()
never resolves:The output is: