Skip to content

Commit ebfc833

Browse files
committed
test(i18n): calibrate the census width guards to the measured population (objectui#12145)
The source-count floors were guesses above the real shipped population; they are now floors under it, plus a guard that the files directly under a src/ root, which the card's pathspec never read, are in the population. Claude-Session: https://claude.ai/code/session_016djJF12Qt14ejKR5Vjt4sK Co-authored-by: Claude <noreply@anthropic.com>
1 parent f47bb07 commit ebfc833

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎packages/i18n/src/__tests__/ariaLabelLiteralCensus-12145.test.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,11 @@ describe('no shipped source names an element with a literal aria-label unless it
315315
for (const pkg of ['apps/console', 'packages/components', 'packages/plugin-designer', 'packages/auth']) {
316316
expect(population, `${pkg} is scanned`).toContain(pkg);
317317
}
318-
expect(sources.length).toBeGreaterThan(3000);
319-
const tsx = sources.filter((s) => s.rel.endsWith('.tsx'));
320-
expect(tsx.length).toBeGreaterThan(1500);
318+
expect(sources.length).toBeGreaterThan(1000);
319+
expect(sources.filter((s) => s.rel.endsWith('.tsx')).length).toBeGreaterThan(500);
320+
// The card's pathspec read none of these: a file directly under a `src/`.
321+
const directlyUnderSrc = sources.filter((s) => /^(packages|apps)\/[^/]+\/src\/[^/]+$/.test(s.rel));
322+
expect(directlyUnderSrc.length, 'files directly under a src/ root are in the population').toBeGreaterThan(100);
321323
});
322324

323325
/**

0 commit comments

Comments
 (0)