;
  observer.observe(newParent, {childList: true});

  newParent.moveBefore(target, null);

  // Wait for microtasks to settle.
  await new Promise(resolve => queueMicrotask(resolve));

  assert_equals(observations.length, 1, "MutationObserver has emitted a single mutation list");
  assert_equals(observations[0].length, 2, "Mutation list has two MutationRecords");

  const removalRecord = observations[0][0];
  const insertionRecord = observations[0][1];
  assert_equals(removalRecord.target, oldParent, "remo