Skip to content

Commit e6f5f93

Browse files
committed
test(core/dfn-index): assert external index exists in data-noindex test
Address Copilot feedback: the test now asserts that the external index section exists and contains the expected 'Event interface' term, so the absence assertion for the excluded term cannot vacuously pass when the index is empty.
1 parent 8a35909 commit e6f5f93

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎tests/spec/core/dfn-index-spec.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,12 @@ describe("Core — dfn-index", () => {
513513
const ops = makeStandardOps({ xref: "web-platform" }, body);
514514
const doc = await makeRSDoc(ops);
515515
const externalIndex = doc.getElementById("index-defined-elsewhere");
516+
expect(externalIndex).toBeTruthy();
516517
const terms = [...externalIndex.querySelectorAll(".index-term")].map(el =>
517518
el.textContent.trim()
518519
);
520+
expect(terms.length).toBeGreaterThan(0);
521+
expect(terms).toContain("Event interface");
519522
expect(terms).not.toContain("Event (noindex)");
520523
});
521524
});

0 commit comments

Comments
 (0)