Skip to content

Commit 072aded

Browse files
committed
test(react): migrate ax/style/perf fixtures to real base-62 class names
1 parent d0c57d2 commit 072aded

2 files changed

Lines changed: 2 additions & 24 deletions

File tree

packages/react/src/runtime/__tests__/ax.test.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -84,28 +84,6 @@ describe('ax - atomic', () => {
8484
['_syaz13q2', '_1UtDYzynoA'],
8585
'_syaz13q2 _1UtDYzynoA',
8686
],
87-
[
88-
'should correctly dedup within legacy format (9-char, 4-char group)',
89-
// Two legacy-format color classes — same 4-char group (_syaz), last wins
90-
// CLEANUP: remove this test when collisionResistantHash becomes the default
91-
['_syaz13q2', '_syaz5scu'],
92-
'_syaz5scu',
93-
],
94-
[
95-
'should correctly dedup within new format (11-char, 6-char group)',
96-
// Two new-format color classes — same 6-char group (_1UtDYz), last wins
97-
['_1UtDYzynoA', '_1UtDYzGowl'],
98-
'_1UtDYzGowl',
99-
],
100-
[
101-
'should not cross-dedup legacy 9-char and new 11-char classes for the same property',
102-
// During version-skew, ax() receives old 9-char classes from pre-built packages
103-
// and new 11-char classes from the app's own styles in the same call.
104-
// Different group key lengths mean they never falsely dedup each other.
105-
// CLEANUP: remove this test when collisionResistantHash becomes the default
106-
['_syaz13q2', '_1UtDYzynoA'],
107-
'_syaz13q2 _1UtDYzynoA',
108-
],
10987
[
11088
'should ignore non atomic declarations when atomic declarations exist',
11189
['hello_there', 'hello_world', '_1UtDYzGowl'],

packages/react/src/runtime/__tests__/style.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,14 @@ describe('<Style />', () => {
314314
createIsolatedTest((Style) => {
315315
// atomic rule: border-bottom shorthand → s-4 bucket
316316
// non-atomic rule: cc- → '' catch-all bucket
317-
const atomicRule = '._1abc2def{border-bottom:2px solid blue}';
317+
const atomicRule = '._1UtDYzynoA{color:blue}';
318318
const nonAtomicRule = '.cc-abc123 .panel{border-bottom:1px solid red;padding:8px}';
319319

320320
render(<Style>{[atomicRule, nonAtomicRule]}</Style>);
321321

322322
// Both rules must be present, even if in separate <style> buckets
323323
const text = getAllCssText();
324-
expect(text).toInclude('_1abc2def');
324+
expect(text).toInclude('_1UtDYzynoA');
325325
expect(text).toInclude('.cc-abc123 .panel');
326326
});
327327
});

0 commit comments

Comments
 (0)