title: Waiting for promises - code hangs
body: <p>I am using Javascript Promises for the first time and ran into something I don't understand.</p>
  
  <p>What I am trying to do is create a validation phase which runs around and checks things - eventually waiting for all promises to resolve. </p>
  
  <p>To do this, I create a validation promise:</p>
  
  <pre><code> validate = function(data) {
       var p = new Promise(function(resolve, reject)){
  </code></pre>
  
  <p>Here I define a promises array for all the different things I will be doing:</p>
  
  <pre><code>         var all_promises = Array();
  </code></pre>
  
  <p>Now do things like this Sequelize call while adding promises into this array (Sequelize returns promises):</p>
  
  <pre><code>         all_promises.push(resBooking);
           resBooking.count(...).then(...).catch(...);
  </code></pre>
  
  <p>I have logging statements that demonstrate we got through then and everything is dandy. Now all I need to do is wait!</p>
  
  <pre><code>        Promise.all(all_promises).then(function(){
              p.resolve();
          });
  </code></pre>
  
  <p>But this silly thing hangs - it waits for something to complete. No CPU usage. What am I doing wrong?</p>