title: How do I check for a script in the header using Cypress?
body: <p>I have the following JS file in the dom...</p>
  <pre><code>&lt;head&gt;
      ...
      &lt;script async=&quot;&quot; src=&quot;https://static.hotjar.com/c/hotjar-2412019.js?sv=6&quot;&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  <p>I am trying to write a test to check this...</p>
  <pre><code>cy.get(&quot;script&quot;).should(&quot;have.attr&quot;, &quot;src&quot;).should(&quot;include&quot;, &quot;hotjar&quot;);
  </code></pre>
  <p>But I get...</p>
  <pre><code>Timed out retrying after 4000ms: expected '[ &lt;script&gt;, 3 more... ]' to have attribute 'src'
      
  </code></pre>