Stability fixes: plugin-scoped contexts for owned pages, absent-href guard, checked locale mounts
CI / full-gate (push) Successful in 2m37s

This commit is contained in:
2026-08-03 23:51:40 +02:00
parent 2b20497785
commit be3bc2bdbb
28 changed files with 176 additions and 58 deletions
+4
View File
@@ -59,6 +59,10 @@ test("localeHref carries the locale on host-relative links only", () => {
assert.equal(localeHref("https://example.com/x", "sv-SE"), "https://example.com/x"); // off-site
assert.equal(localeHref("//example.com/x", "sv-SE"), "//example.com/x"); // protocol-relative is off-site too
assert.equal(localeHref("", "sv-SE"), "");
// The building blocks document href as optional (an unlinked page item, a header with no sort
// target) — an absent one must not throw, or the page breaks only for visitors who chose a language.
assert.equal(localeHref(undefined as unknown as string, "sv-SE"), undefined);
assert.equal(localeHref(null as unknown as string, "sv-SE"), null);
});
test("textDirection reads the script direction, defaulting to ltr", () => {