Skip to content

Commit 13e0803

Browse files
committed
test(ui): block-config-i18n pins the emptied designer table
The designer table's floor was "non-empty"; with its last rows moved into the studio namespace it now asserts both tables are empty, so a key moved back would shadow the namespace. The 3,000-key floor over both homes keeps the parser's non-vacuity. Claude-Session: https://claude.ai/code/session_01JQwxbX3S5QrD29Ghii633f Co-authored-by: Claude <noreply@anthropic.com>
1 parent 531867e commit 13e0803

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎ui/packages/app-shell/src/views/metadata-admin/previews/__tests__/block-config-i18n.test.ts‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -673,17 +673,18 @@ function pageBlockKeys(table: EngineStringTable): string[] {
673673
}
674674

675675
describe('a retired key leaves BOTH locale tables (objectui#8368)', () => {
676-
it('reads two disjoint, non-empty tables out of i18n.ts', () => {
676+
it('reads two disjoint tables out of i18n.ts, both emptied into the namespace', () => {
677677
// The extractor is a source parser, so its silent failure mode is finding
678678
// FEWER keys — which would make every assertion below vacuously green over
679679
// an empty corpus. Ranges first: overlapping ones would mean the `};`
680680
// scan ran past a table and both sets became the same set.
681-
// The table drains slice by slice into the namespace (objectstack#25922),
682-
// so its floor is "non-empty"; the 3,000-key floor is held over both homes
683-
// together, below.
681+
// The table drained slice by slice into the namespace (objectstack#25922)
682+
// and is empty since slice S6b: a key back in it would shadow the
683+
// namespace's copy. The 3,000-key floor, held over both homes together
684+
// below, is what keeps an empty table from reading as a parser gone quiet.
684685
expect(EN_TABLE.to).toBeLessThan(ZH_TABLE.from);
685-
expect(EN_TABLE.keys.length).toBeGreaterThan(0);
686-
expect(ZH_TABLE.keys.length).toBeGreaterThan(0);
686+
expect(EN_TABLE.keys).toEqual([]);
687+
expect(ZH_TABLE.keys).toEqual([]);
687688
// No duplicates: a key declared twice would be a silent overwrite, and the
688689
// set arithmetic below would hide it.
689690
expect(EN_TABLE.keys.length).toBe(new Set(EN_TABLE.keys).size);

0 commit comments

Comments
 (0)