title: Using Promise.all with assertion
body: <p>I have a small test (Mocha/Chai), which tests that the encryptPass function returns the correct hash:</p>
  
  <pre><code>const assert = require('chai').assert;
  const bcrypt = require('bcrypt');
  var encryptPass = require('../../shared/helpers/encryptPass.js');
  var createUUID = require('../../shared/helpers/createUUID.js');
  
  describe('encryptPass', function() {
      it('returns correct password hash', () =&gt; {
          var pass = createUUID();
          var encryptedPass = encryptPass(pass);
          Promise.all([pass, encryptedPass]).then(values =&gt; {
              let [pass, encryptedPass] = values;
              var compareResult = bcrypt.compareSync(pass, encryptedPass);
              assert.equal(compareResult, true);
          });
      });
  });
  </code></pre>
  
  <p>My concern is that there is that the assertion is assuming that the Promise.all function will work without throwing an error. How best to handle this?</p>