Stability fixes: plugin-scoped contexts for owned pages, absent-href guard, checked locale mounts
CI / full-gate (push) Successful in 2m37s
CI / full-gate (push) Successful in 2m37s
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user