title: Node.js Promise.all() hanging
body: <p>Kind of stuck on this one. Working with <a href="https://github.com/then/promise" rel="nofollow">https://github.com/then/promise</a> on node.js</p>
  
  <pre><code>exports.count = function ( models, callback ) {
    var promises = [];
  
    models.forEach(function ( name ) {
      promises.push( countOne( name ) );
    });
  
    Promise.all( promises ).then(function ( res ) {
      callback( null, res );
    });
  
    Promise.resolve(promises[0]).then(function (res) {
      console.log('resolved individual with res', res);
    });
  };
  
  function countOne ( exampleArg ) {
    return new Promise(function ( resolve, reject ) {
      // It resolves or rejects
    });
  }
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>Promise.all( promises.map(function ( it ) { return Promise.resolve(it); }) ).then(function ( res ) {
    callback( null, res );
  });
  </code></pre>
  
  <p>Either way, Promise.all doesn't fire the then. Promise.resolve does, however, give the appropriate response.</p>