title: Jest - Test is successful even though it should not be
body: <p>I've simplified my scripts to let you easily understand what's going on. I have a test that waits for an object to be ready before checking whether an array contains a value.</p>
  <pre><code>const list = ['A', 'B', 'C'];
  describe('check array', (done) =&gt; {
    it('should not contain D', () =&gt; {
      const monitor = new Monitor();
  
      monitor.ready().then(() =&gt; {
        expect(list.indexOf('D')).toEqual(1);
  
        done();
      });
    });
  });
  </code></pre>
  <p>As you can see, <code>D</code> is not an element of <code>list</code> (so <code>indexOf</code> should return -1), but this test still passes. I've tried both <code>toEqual</code> and <code>toBe</code> with no luck. I'm wondering if it has something to do with the fact that I'm waiting for the Promise to resolve first? Thanks!</p>