()
| 447 | // dup appears AFTER it. querySelector document-order would return the inner one, |
| 448 | // but getElement prefers the canonical (top-level) match. The two APIs must agree. |
| 449 | const ambiguousHtml = () => |
| 450 | inlinedHtml(` |
| 451 | <div data-hf-id="hf-root" data-hf-root> |
| 452 | <div data-hf-id="hf-host" data-composition-file="sub.html"> |
| 453 | <p data-hf-id="hf-dup" class="inner">inner</p> |
| 454 | </div> |
| 455 | <p data-hf-id="hf-dup" class="outer">outer</p> |
| 456 | </div> |
| 457 | `); |
| 458 | |
| 459 | it("bare id resolves to the canonical (top-level) instance, matching getElement", async () => { |
| 460 | const comp = await openComposition(ambiguousHtml()); |
no test coverage detected