You are reading a single comment by @Drarok and its replies. Click here to read the full conversation.
  • The following code demonstrates that Promise.all() never resolves:

    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
    
About

Avatar for Drarok @Drarok started