Skip to content

Commit 0c16d82

Browse files
committed
test(cli): make the target-rule parity pins non-vacuous
Claude-Session: https://claude.ai/code/session_01AFrKwndmrCLtF5V9hNtrw3 Co-authored-by: Claude <noreply@anthropic.com>
1 parent d4e0e40 commit 0c16d82

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎packages/cli/test/i18n-contributed-nav-coverage.test.ts‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,15 +216,22 @@ describe('every contributed key the walker expects is one translation-target-unk
216216

217217
it('accepts every expected key on the composed stack', () => {
218218
const stack = composed();
219-
expect(unknownTargets(stack, bundleOf(stack))).toEqual([]);
219+
const bundle = bundleOf(stack);
220+
// Not vacuous: the bundle carries the contributed ids, not only the app's own.
221+
expect(Object.keys(bundle['zh-CN'].apps.cnv_desk.navigation)).toEqual([
222+
'grp_service', 'nav_accounts', 'nav_case', 'grp_knowledge', 'nav_article',
223+
]);
224+
expect(unknownTargets(stack, bundle)).toEqual([]);
220225
});
221226

222227
it('accepts the expected key under an app the stack only contributes into', () => {
223228
const single = defineStack({
224229
manifest: { ...svcManifest, navigationContributions: [{ app: 'crm_enterprise', items: CONTRIBUTIONS[0].items }] },
225230
objects: [object('cnv_case', 'Case')],
226231
} as any) as any;
227-
expect(unknownTargets(single, bundleOf(single))).toEqual([]);
232+
const bundle = bundleOf(single);
233+
expect(Object.keys(bundle['zh-CN'].apps)).toEqual(['crm_enterprise']);
234+
expect(unknownTargets(single, bundle)).toEqual([]);
228235
});
229236

230237
it('control: still refuses a navigation id nothing declares or contributes', () => {

0 commit comments

Comments
 (0)