title: How to test Date(Invalid Date) with jasmine
body: <p>To simplify, lets see this function getting date and returning a date modified (start of day):</p>
  
  <pre><code>const getStartOfDay = date =&gt; {
      const newDate = new Date(date);
    newDate.setHours(0, 0, 0, 0);
    return newDate;
  }
  </code></pre>
  
  <p>Now I want to implement some tests with invalid values i.e: <code>getStartOfDay(new Date("HELLO"));</code> function returns <code>Date(Invalid Date)</code>.</p>
  
  <p>I tried to test like:</p>
  
  <pre><code>expect(util.getStartOfDay("hello")).toBe(new Date("hello"));
  </code></pre>
  
  <p>But I get:</p>
  
  <blockquote>
    <p>Expected Date(Invalid Date) to equal Date(Invalid Date).</p>
  </blockquote>
  
  <p>Same error with <code>toEquals()</code>... </p>
  
  <p>Other dates I compare with <code>getTime()</code> but here I cant... So I get stucked...</p>
  
  <p><strong>Any idea of how can I test it?</strong></p>