From d943dcef73b43b722ae0d1f9bbcffbf66955c980 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 18 Sep 2026 12:11:15 +0000 Subject: [PATCH] test: tighten article tab coverage Co-authored-by: wangcham <95991795+wangcham@users.noreply.github.com> --- tests/blog-articles.test.mjs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/blog-articles.test.mjs b/tests/blog-articles.test.mjs index 2e9ef2b72..6f650f6cb 100644 --- a/tests/blog-articles.test.mjs +++ b/tests/blog-articles.test.mjs @@ -12,6 +12,15 @@ const localeConfig = { zh: { language: "cn", tab: "文章" }, ja: { language: "jp", tab: "記事" }, }; +const extraArticlePages = { + en: [], + zh: [ + "zh/articles/langbot-telegram-sandbox-agent", + "zh/articles/langbot-wechat-official-account", + "zh/articles/langbot-wecom-customer-service-knowledge-base", + ], + ja: [], +}; test("all canonical Blog slugs are published in every Wiki locale", () => { const slugsByLocale = new Map(); @@ -31,9 +40,11 @@ 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.filter((article) => article.locale === locale).map((article) => article.page); - const expectedSet = new Set(expected); - assert.deepEqual([...pages.filter((page) => expectedSet.has(page))].sort(), [...expected].sort()); + const expected = manifest.articles + .filter((article) => article.locale === locale) + .map((article) => article.page) + .concat(extraArticlePages[locale]); + assert.deepEqual([...pages].sort(), [...expected].sort()); assert.equal(new Set(pages).size, pages.length, `${locale} has duplicate article navigation entries`); } });