From a8bcba6706ff8925e1e91449c7fb8ab2cc7bbe5a Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 17 Mar 2026 15:44:26 +0100 Subject: [PATCH] Update extractTranslations test for promoted translation refs The test expected the org plugin's main entry point to have no TranslationRef exports, but the promotion changes now export orgTranslationRef from the stable entry point. Update the test to verify that only the TranslationRef is extracted while non-TranslationRef exports are still ignored. Signed-off-by: Patrik Oldsberg Made-with: Cursor --- .../src/lib/extractTranslations.test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/cli-module-translations/src/lib/extractTranslations.test.ts b/packages/cli-module-translations/src/lib/extractTranslations.test.ts index 13a94f3a0a..03d9044753 100644 --- a/packages/cli-module-translations/src/lib/extractTranslations.test.ts +++ b/packages/cli-module-translations/src/lib/extractTranslations.test.ts @@ -62,7 +62,8 @@ describe('extractTranslations', () => { resolvePath(__dirname, '../../../../tsconfig.json'), ); - // The main entry of org plugin exports components but no translation ref + // The main entry of org plugin exports components and a translation ref; + // only the translation ref should be extracted. const sourceFile = project.addSourceFileAtPath( resolvePath(__dirname, '../../../..', 'plugins/org/src/index.ts'), ); @@ -73,7 +74,13 @@ describe('extractTranslations', () => { '.', ); - expect(refs).toHaveLength(0); + expect(refs).toHaveLength(1); + expect(refs[0]).toMatchObject({ + id: 'org', + packageName: '@backstage/plugin-org', + exportPath: '.', + exportName: 'orgTranslationRef', + }); }); it('extracts from the test fixtures translation ref', () => {