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 <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-17 15:44:26 +01:00
parent 0be2541b5c
commit a8bcba6706
@@ -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', () => {