From d84fd9b60b7c92ebdd0ab74bcd8a68436d7a34ef Mon Sep 17 00:00:00 2001 From: "Hyeonjae.Jeong" Date: Thu, 12 Nov 2026 14:38:02 +0900 Subject: [PATCH] test(i18n): check display-only error messages in one source scan --- packages/i18n/test/display-only.test.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/i18n/test/display-only.test.ts b/packages/i18n/test/display-only.test.ts index e380a072b47..807af81f192 100644 --- a/packages/i18n/test/display-only.test.ts +++ b/packages/i18n/test/display-only.test.ts @@ -60,13 +60,7 @@ describe("errorMessage() stays display-only", () => { offenders.push(`${dir}/${file}:${line} ${name}`); } } - } - // Alias tracking: `const x = errorMessage(...)` later string-matched. - const glob2 = new Bun.Glob("**/*.{ts,tsx}"); - for await (const file of glob2.scan({ cwd: join(REPO_ROOT, dir) })) { - if (file.includes(".test.") || file.includes(".stories.")) continue; - const source = await Bun.file(join(REPO_ROOT, dir, file)).text(); - if (!source.includes("errorMessage(")) continue; + // Also catch string matching on a variable assigned from errorMessage(). const aliases = [ ...source.matchAll( /(?:const|let)\s+(\w+)\s*=\s*\n?\s*errorMessage\(/g,