From 62ce73250fd52229e5fd39c7e068e18fb44aa65f Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 28 Oct 2026 17:17:24 +0800 Subject: [PATCH] gui tests: old-webkit knows webfonts.js is imported, not a page script a1f06bd78 (Norcleeh's browser-tab fonts) added webfonts.js, which app.js's loadFonts imports in a browser tab only. old-webkit's "compat.js is the first of the page's own scripts" asks every asset .js to be in index.html, so it has been red on main since: "webfonts.js is not loaded by index.html". It now leaves webfonts.js out of that one check; the syntax and built-in checks still read it. Red on origin/main eb6d1d8d9 (mote). At this head on aca0f0d8a, mote: node --test old-webkit (with nine other GUI files): 152 pass, 0 fail. --- internal/gui/tests/old-webkit.test.cjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/gui/tests/old-webkit.test.cjs b/internal/gui/tests/old-webkit.test.cjs index 54a56f385..b8eb0d53b 100644 --- a/internal/gui/tests/old-webkit.test.cjs +++ b/internal/gui/tests/old-webkit.test.cjs @@ -141,7 +141,9 @@ test("compat.js is the first of the page's own scripts", async () => { const all = [...html.matchAll(/ m[1]); const srcs = all.filter((s) => s !== "boot.js" && s !== "theme.js" && s !== "omarchy.js"); assert.equal(srcs[0], "compat.js", "loaded first: " + srcs.join(", ")); - for (const f of await scripts()) assert(all.includes(f), f + " is not loaded by index.html"); + // webfonts.js is imported by app.js in a browser tab only; the checks + // above still read it + for (const f of await scripts()) if (f !== "webfonts.js") assert(all.includes(f), f + " is not loaded by index.html"); }); test("the styles hold up in Safari 15.0", async () => {