+ [[[fetch#data-fetch|fetching data]]]
+ [[[fetch#data-fetch]]]
+
+ `;
+ const doc = await makeRSDoc(makeStandardOps(config, body));
+ const aliasAnchor = doc.querySelector("#alias a[href]");
+ expect(aliasAnchor).toBeTruthy();
+ expect(aliasAnchor.href).toBe("https://fetch.spec.whatwg.org/#data-fetch");
+ expect(aliasAnchor.textContent).toBe("fetching data");
+
+ const noAliasAnchor = doc.querySelector("#no-alias a[href]");
+ expect(noAliasAnchor).toBeTruthy();
+ // heading from local fixture: { number: "4.1", title: "Fetching data" }
+ expect(noAliasAnchor.textContent).toBe("4.1 Fetching data");
+ });
+
+ it("supports alias text with [[[SPEC|text]]] syntax (no fragment)", async () => {
+ const config = {
+ localBiblio: {
+ fetch: {
+ title: "Fetch Standard",
+ href: "https://fetch.spec.whatwg.org/",
+ },
+ },
+ };
+ const body = `
+