Pin the chrome's locale carrying in unit tests; keep one carrier list
CI / full-gate (push) Successful in 2m36s

This commit is contained in:
2026-08-03 23:25:54 +02:00
parent b3df7084c4
commit 2b20497785
4 changed files with 24 additions and 7 deletions
+8
View File
@@ -52,3 +52,11 @@ test("field defaults to a bare text input, escapes a string error, and never thr
assert.match(stringErr, /<span>&lt;b&gt;Required&lt;\/b&gt;\.<\/span>/); // string error is escaped
assert.match(stringErr, /aria-describedby="x-err"/);
});
test("an inline field link carries the visitor's language", async () => {
const html = await ejs.renderFile(field, {
...ENGLISH_LOCALS, localeHref: (href: string) => `${href}?locale=sv-SE`,
id: "password", label: "Password", link: { href: "/recovery", label: "Forgot password?" }, name: "password",
});
assert.match(html, /href="\/recovery\?locale=sv-SE"/);
});