diff --git a/tests/unit/i18n-missing-placeholder-fallback.test.ts b/tests/unit/i18n-missing-placeholder-fallback.test.ts index d40bbc1fda..601982c2ce 100644 --- a/tests/unit/i18n-missing-placeholder-fallback.test.ts +++ b/tests/unit/i18n-missing-placeholder-fallback.test.ts @@ -29,11 +29,7 @@ function loadLocale(locale: string): Record { return JSON.parse(raw) as Record; } -function collectPlaceholderLeaves( - node: unknown, - pathPrefix: string, - out: string[] -): void { +function collectPlaceholderLeaves(node: unknown, pathPrefix: string, out: string[]): void { if (node === null || typeof node !== "object") { if (typeof node === "string" && node.startsWith(PLACEHOLDER_PREFIX)) { out.push(pathPrefix); @@ -47,19 +43,13 @@ function collectPlaceholderLeaves( } // --------------------------------------------------------------------------- -// 1. Focused repro: the exact keys from the issue report +// 1. (Retired) The original repro asserted zh-TW.json STILL carried raw +// __MISSING__: placeholders. That translation backlog has since been filled, so +// the sentinel no longer ships on disk — the invariant "no locale has a raw +// __MISSING__: leaf" (test 3 below) is the durable guard. Keeping a test that +// requires the backlog to EXIST would fail exactly when the content is healthy. // --------------------------------------------------------------------------- -test("#7258 repro: zh-TW keys carry a raw __MISSING__: placeholder before the fix is exercised", () => { - const zhTW = loadLocale("zh-TW"); - const leaves: string[] = []; - collectPlaceholderLeaves(zhTW, "", leaves); - assert.ok( - leaves.length > 0, - "expected zh-TW.json to still contain __MISSING__: placeholders (translation content backlog)" - ); -}); - test("#7258: deepMergeFallback replaces an untranslated __MISSING__ placeholder with the EN fallback value", () => { const target: Record = { localUsageCommand: `${PLACEHOLDER_PREFIX}Run this command locally`, diff --git a/tests/unit/qianfan-provider.test.ts b/tests/unit/qianfan-provider.test.ts index 3ed73cec05..16633705a5 100644 --- a/tests/unit/qianfan-provider.test.ts +++ b/tests/unit/qianfan-provider.test.ts @@ -26,7 +26,7 @@ test("qianfan registers Baidu ERNIE as an OpenAI-compatible API key provider", ( assert.ok(APIKEY_PROVIDERS.qianfan, "qianfan should be visible in API key providers"); assert.equal(APIKEY_PROVIDERS.qianfan.name, "Baidu Qianfan"); - assert.equal(APIKEY_PROVIDERS.qianfan.website, "https://cloud.baidu.com/product/wenxinworkshop"); + assert.equal(APIKEY_PROVIDERS.qianfan.website, "https://cloud.baidu.com/product-s/qianfan_home"); assert.equal(APIKEY_PROVIDERS.qianfan.passthroughModels, undefined); assert.equal(PROVIDERS.qianfan.baseUrl, registryEntry.baseUrl);