Skip to content

Commit 72ea1ab

Browse files
committed
fix test
1 parent 307e745 commit 72ea1ab

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

packages/@react-spectrum/s2/style/__tests__/style-macro.test.js

+36-36
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ describe('style-macro', () => {
4040
"@layer _.a, _.b, _.c;
4141
4242
@layer _.b {
43-
.jnb:first-child {
43+
._bnb:first-child {
4444
margin-top: 0.25rem;
4545
}
4646
}
4747
48-
@layer _.c.YxLy {
49-
@media (min-width: 1024px) {
50-
.jnYxLyf:first-child {
48+
@layer _.c.r {
49+
@media (min-width: 64rem) {
50+
._bnre:first-child {
5151
margin-top: 0.5rem;
5252
}
5353
}
5454
}
5555
5656
"
5757
`);
58-
expect(js).toMatchInlineSnapshot('" jnb jnYxLyf"');
58+
expect(js).toMatchInlineSnapshot('" _bnb _bnre"');
5959
});
6060

6161
it('should support self references', () => {
@@ -69,56 +69,56 @@ describe('style-macro', () => {
6969
"@layer _.a;
7070
7171
@layer _.a {
72-
._nb {
72+
.Rb {
7373
border-top-width: 2px;
7474
}
7575
7676
77-
._ma {
77+
.Qc {
7878
border-bottom-width: 2px;
7979
}
8080
8181
82-
._twdjPYd {
83-
border-inline-start-width: var(--_t);
82+
.ZvFFGYc {
83+
border-inline-start-width: var(--Z);
8484
}
8585
8686
87-
._sa {
87+
.Xb {
8888
border-inline-end-width: 2px;
8989
}
9090
9191
92-
.oGQFGYc {
93-
padding-inline-start: var(--o);
92+
.CgtFGYc {
93+
padding-inline-start: var(--C);
9494
}
9595
9696
97-
.nb {
98-
padding-inline-end: calc(var(--e, var(--s)) * 3 / 8);
97+
.Ab {
98+
padding-inline-end: calc(var(--e, var(--l)) * 3 / 8);
9999
}
100100
101101
102-
.fNANddc {
103-
width: calc(200px - var(--_t) - var(--o));
102+
.fWvRISb {
103+
width: calc(200px - var(--Z) - var(--C));
104104
}
105105
106106
107-
.-_t_-_ta {
108-
--_t: 2px;
107+
.-Z_-Za {
108+
--Z: 2px;
109109
}
110110
111111
112-
.-o_-ob {
113-
--o: calc(var(--e, var(--s)) * 3 / 8);
112+
.-C_-Cb {
113+
--C: calc(var(--e, var(--l)) * 3 / 8);
114114
}
115115
}
116116
117117
"
118118
`);
119119

120120
expect(js).toMatchInlineSnapshot(
121-
'" _nb _ma _twdjPYd _sa oGQFGYc nb fNANddc -_t_-_ta -o_-ob"'
121+
'" Rb Qc ZvFFGYc Xb CgtFGYc Ab fWvRISb -Z_-Za -C_-Cb"'
122122
);
123123
});
124124

@@ -153,9 +153,9 @@ describe('style-macro', () => {
153153
translateX: 40
154154
});
155155

156-
expect(js()).toMatchInlineSnapshot('" -_7PloMd-zTRurc _Ia"');
157-
expect(overrides).toMatchInlineSnapshot('" -_7PloMd-Kr5lvc _Ia"');
158-
expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-Kr5lvc _Ia"');
156+
expect(js()).toMatchInlineSnapshot('" -_7PloMd-6cJurc _ca"');
157+
expect(overrides).toMatchInlineSnapshot('" -_7PloMd-BZRurc _ca"');
158+
expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-BZRurc _ca"');
159159
});
160160

161161
it('should support allowed overrides for shorthands', () => {
@@ -170,9 +170,9 @@ describe('style-macro', () => {
170170
padding: 40
171171
});
172172

173-
expect(js()).toMatchInlineSnapshot('" rg vd of ng"');
174-
expect(overrides).toMatchInlineSnapshot('" rw vw oy ny"');
175-
expect(js({}, overrides)).toMatchInlineSnapshot('" rw vw oy ny"');
173+
expect(js()).toMatchInlineSnapshot('" Hg Wd Cf Ae"');
174+
expect(overrides).toMatchInlineSnapshot('" Ho Wo Cq Aq"');
175+
expect(js({}, overrides)).toMatchInlineSnapshot('" Ho Wo Cq Aq"');
176176
});
177177

178178
it("should support allowed overrides for values that aren't defined", () => {
@@ -350,28 +350,28 @@ describe('style-macro', () => {
350350
padding: 24
351351
});
352352

353-
expect(js).toMatchInlineSnapshot('" rc vc od nd"');
353+
expect(js).toMatchInlineSnapshot('" Hb Wb Ce Ad"');
354354
expect(css).toMatchInlineSnapshot(`
355355
"@layer _.a;
356356
357357
@layer _.a {
358-
.rc {
359-
padding-top: 1.5rem;
358+
.Hb {
359+
padding-top: 24px;
360360
}
361361
362362
363-
.vc {
364-
padding-bottom: 1.5rem;
363+
.Wb {
364+
padding-bottom: 24px;
365365
}
366366
367367
368-
.od {
369-
padding-inline-start: 1.5rem;
368+
.Ce {
369+
padding-inline-start: 24px;
370370
}
371371
372372
373-
.nd {
374-
padding-inline-end: 1.5rem;
373+
.Ad {
374+
padding-inline-end: 24px;
375375
}
376376
}
377377

0 commit comments

Comments
 (0)