title: expect in Promise based then function in jest not failing
body: <p>So I've spend few minutes debugging my jest test and wondering why it was not failing and it seems that jest is using exceptions thrown by expect to handle failures and somehow my function don't throw unhandled exception like it should:</p>
  
  <p>this is my test that pass:</p>
  
  <pre><code>    fit('should evalute let over lambda', function() {
          lips.exec(`(define x 10) (* x x)`).then(result =&gt; {
              expect(result).toEqual([undefined, 20]);
          }) //.catch(e =&gt; console.log(e.message));
      });
  </code></pre>
  
  <p>and the console.log in catch prints that's the code was failing but summary says that all tests pass.</p>
  
  <p>Here is my exec function, is everything ok with it?</p>
  
  <pre><code>function exec(string, env, dynamic_scope) {
      if (env === true) {
          env = dynamic_scope = global_env;
      } else {
          env = env || global_env;
      }
      var list = parse(tokenize(string));
      return new Promise((resolve, reject) =&gt; {
          var results = [];
          (function recur() {
              function next(value) {
                  console.log('next');
                  results.push(value);
                  recur();
              }
              var code = list.shift();
              if (!code) {
                  resolve(results);
              } else {
                  try {
                      var result = evaluate(code, env, dynamic_scope);
                  } catch (e) {
                      return reject(e);
                  }
                  if (result instanceof Promise) {
                      console.log('promise');
                      result.then(next).catch(reject);
                  } else {
                      next(result);
                  }
              }
          })();
      });
  }
  </code></pre>
  
  <p>the promise is resolved. the expect is executed it throw exception but it not propagate.</p>