From e04c5cedae9e76b7889ae082cbcac81649f6f6f1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 18 Sep 2026 12:12:20 +0000 Subject: [PATCH] test: guard shared article route allowlist Co-authored-by: wangcham <95991795+wangcham@users.noreply.github.com> --- tests/blog-articles.test.mjs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/blog-articles.test.mjs b/tests/blog-articles.test.mjs index 496220ebc..9c788fb50 100644 --- a/tests/blog-articles.test.mjs +++ b/tests/blog-articles.test.mjs @@ -37,10 +37,16 @@ test("article tabs group every generated Blog page exactly once", () => { assert.equal(matchingTabs.length, 1, `${locale} must have exactly one ${config.tab} tab`); const tab = matchingTabs[0]; const pages = tab.groups.flatMap((group) => group.pages).filter((page) => page !== `${locale}/articles/index`); - const expected = manifest.articles + const manifestPages = manifest.articles .filter((article) => article.locale === locale) - .map((article) => article.page) - .concat(extraArticlePages[locale]); + .map((article) => article.page); + const extras = extraArticlePages[locale]; + assert.deepEqual( + extras.filter((page) => manifestPages.includes(page)), + [], + `${locale} extra article pages must not overlap with the synchronized manifest`, + ); + const expected = manifestPages.concat(extras); assert.deepEqual([...pages].sort(), [...expected].sort()); assert.equal(new Set(pages).size, pages.length, `${locale} has duplicate article navigation entries`); }