test(() => {
    if (target.dataset.expected == 'false')
      assert_false(target.matches('div:last-of-type'));
    else
      assert_true(target.matches('div:last-of-type'));
  }, target.textContent.replaceAll('\n', ' '));
}

test(() => {
  const ia1 = document.querySelector('#insertAfter1');
  const target = document.createElement('div');
  assert_true(ia1.matches('div:last-of-type'));
  ia1.parentNode.insertBefore(target, ia1.nextSibling);
  assert_true(target.matches('div:last-of-type'));
  assert_fals