Assert that a DOM element have children.

var element = createElement(`
  <section>
    <h1>Numbers</h1>
    <hr>
    <ol>
      <li>One</li>
      <li>Two</li>
      <li>Three</li>
    </ol>
  </section>
`);
expect(element, 'queried for first', 'ol', 'to have children');

You get the following error when it fails:

expect(element, 'queried for first', 'hr', 'to have children');
expected
<section>
  
<h1>Numbers</h1>
  
<hr>
  
<ol><li>...</li><li>...</li><li>...</li></ol>
</section>
queried for first hr to have children
  
expected <hr> to have children

You can also assert that an element has no children:

expect(element, 'queried for first', 'hr', 'to have no children');

When it fails you get this error:

expect(element, 'queried for first', 'ol', 'to have no children');
expected
<section>
  
<h1>Numbers</h1>
  
<hr>
  
<ol><li>...</li><li>...</li><li>...</li></ol>
</section>
queried for first ol to have no children
  
expected <ol><li>One</li><li>Two</li><li>Three</li></ol> to have no children