title: Make a jest test to fail on any error thrown?
body: <p>How can I make a jest test fail on any error thrown?</p>
  
  <p>I have tried around a bit, but haven't nailed the syntax yet.</p>
  
  <pre><code>test('getArcId =&gt; Error', async () =&gt; {
      await expect(client.getArcId('skynet')).rejects.toThrow();
  });
  </code></pre>
  
  <p>I get the error message</p>
  
  <blockquote>
    <p>getArcId › getArcId => Error</p>
    
    <p>expect(received).rejects.toThrow()</p>
    
    <p>Received function did not throw</p>
  </blockquote>
  
  <p>However the following test passes, so the function I intend to test does throw (at least to the best of my understanding of what throw means):</p>
  
  <pre><code>test('getArcId =&gt; Error', async () =&gt; {
      await client.getArcId('skynet').catch(e =&gt; 
          expect(e.message).toBe('Command failure')
      );
  });
  </code></pre>