

container.innerHTML = `<a id="link-a" class="test">a link</a>`;
assert_array_equals(getIDs(), ["link-a"], "Sanity check: initial setup");

container.innerHTML = `<a id="link-b" class="test"><img src="foo.jpg"></a>`;
assert_array_equals(getIDs(), ["link-b"], "After replacement");

container.innerHTML = `<a id="link-a" class="test">a link</a>`;
assert_array_equals(getIDs(), ["link-a"], "After changing back to the original HTML");

done();
</script>
