title: UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
body: <p>I am getting this huge error running a Mocha test with node version 10 and a MongoDB database:</p>
  
  <blockquote>
    <p>(node:27884) UnhandledPromiseRejectionWarning: AssertionError
    [ERR_ASSERTION]: The expression evaluated to a falsy value:</p>
    
    <p>assert(
        user.blogPosts[0].comments[0].content ===
          'As programs get bigger, they also become more complex'   )</p>
  
  <pre><code>at User.findOne.populate.then.user (/Users/danale/Projects/users/test/association_test.js:50:9)
  at process._tickCallback (internal/process/next_tick.js:68:7) (node:27884) UnhandledPromiseRejectionWarning: Unhandled promise
  </code></pre>
    
    <p>rejection. This error originated either by throwing inside of an async
    function without a catch block, or by rejecting a promise which was
    not handled with .catch(). (rejection id: 1) (node:27884) [DEP0018]
    DeprecationWarning: Unhandled promise rejections are deprecated. In
    the future, promise rejections that are not handled will terminate the
    Node.js process with a non-zero exit code.</p>
  </blockquote>
  
  <p>For a Mocha test that was working earlier:</p>
  
  <pre><code>it('saves a full relation graph', done =&gt; {
      User.findOne({ name: 'Joe' })
        .populate({
          path: 'blogPosts',
          populate: {
            path: 'comments',
            model: 'comment',
            populate: {
              path: 'user',
              model: 'user'
            }
          }
        })
        .then(user =&gt; {
          assert(user.name === 'Joe');
          assert(user.blogPosts[0].title === 'Eloquent JavaScript');
          assert(
            user.blogPosts[0].comments[0].content ===
              'As programs get bigger, they also become more complex'
          );
          assert(user.blogPosts[0].comments[0].user.name === 'Joe');
          done();
        });
    });
  </code></pre>
  
  <p>So I know the issue is here: </p>
  
  <pre><code>assert(
     user.blogPosts[0].comments[0].content ===
       'As programs get bigger, they also become more complex'
  );
  </code></pre>
  
  <p>but what exactly is wrong with this?</p>