@@ -5,7 +5,7 @@ import { render } from '@testing-library/react'
5
5
import { css as differentCss , flush , sheet } from './emotion-instance'
6
6
7
7
describe ( 'css' , ( ) => {
8
- test ( 'float property' , async ( ) => {
8
+ test ( 'float property' , ( ) => {
9
9
const cls1 = differentCss `
10
10
float: left;
11
11
`
@@ -14,7 +14,7 @@ describe('css', () => {
14
14
expect ( container . firstChild ) . toMatchSnapshot ( )
15
15
} )
16
16
17
- test ( 'handles more than 10 dynamic properties' , async ( ) => {
17
+ test ( 'handles more than 10 dynamic properties' , ( ) => {
18
18
const cls1 = differentCss `
19
19
text-decoration: ${ 'underline' } ;
20
20
border-right: solid blue 54px;
@@ -33,12 +33,12 @@ describe('css', () => {
33
33
expect ( container . firstChild ) . toMatchSnapshot ( )
34
34
} )
35
35
36
- test ( 'falsy value in nested selector on object' , async ( ) => {
36
+ test ( 'falsy value in nested selector on object' , ( ) => {
37
37
const cls1 = differentCss ( { ':hover' : { display : null , color : 'hotpink' } } )
38
38
const { container } = render ( < div className = { cls1 } /> )
39
39
expect ( container . firstChild ) . toMatchSnapshot ( )
40
40
} )
41
- test ( 'boolean as value' , async ( ) => {
41
+ test ( 'boolean as value' , ( ) => {
42
42
const cls1 = differentCss ( {
43
43
display : 'flex' ,
44
44
color : false ,
@@ -47,13 +47,13 @@ describe('css', () => {
47
47
const { container } = render ( < div className = { cls1 } /> )
48
48
expect ( container . firstChild ) . toMatchSnapshot ( )
49
49
} )
50
- test ( 'auto px' , async ( ) => {
50
+ test ( 'auto px' , ( ) => {
51
51
const cls1 = differentCss ( { display : 'flex' , flex : 1 , fontSize : 10 } )
52
52
const { container } = render ( < div className = { cls1 } /> )
53
53
expect ( container . firstChild ) . toMatchSnapshot ( )
54
54
} )
55
55
56
- test ( 'random interpolation with undefined values' , async ( ) => {
56
+ test ( 'random interpolation with undefined values' , ( ) => {
57
57
const cls2 = differentCss `
58
58
${ undefined } ;
59
59
justify-content: center;
@@ -62,7 +62,7 @@ describe('css', () => {
62
62
expect ( container . firstChild ) . toMatchSnapshot ( )
63
63
} )
64
64
65
- test ( 'random expression' , async ( ) => {
65
+ test ( 'random expression' , ( ) => {
66
66
const cls2 = differentCss `
67
67
font-size: 20px;
68
68
@media (min-width: 420px) {
@@ -79,7 +79,7 @@ describe('css', () => {
79
79
expect ( container . firstChild ) . toMatchSnapshot ( )
80
80
} )
81
81
82
- test ( 'simple composition' , async ( ) => {
82
+ test ( 'simple composition' , ( ) => {
83
83
const cls1 = differentCss `
84
84
display: flex;
85
85
&:hover {
@@ -94,7 +94,7 @@ describe('css', () => {
94
94
expect ( container . firstChild ) . toMatchSnapshot ( )
95
95
} )
96
96
97
- test ( 'handles objects' , async ( ) => {
97
+ test ( 'handles objects' , ( ) => {
98
98
const cls1 = differentCss ( {
99
99
float : 'left' ,
100
100
display : 'flex' ,
@@ -107,19 +107,19 @@ describe('css', () => {
107
107
expect ( container . firstChild ) . toMatchSnapshot ( )
108
108
} )
109
109
110
- test ( 'handles array of objects' , async ( ) => {
110
+ test ( 'handles array of objects' , ( ) => {
111
111
const cls1 = differentCss ( [ { height : 50 , width : 20 } , null ] )
112
112
const { container } = render ( < div className = { cls1 } /> )
113
113
expect ( container . firstChild ) . toMatchSnapshot ( )
114
114
} )
115
115
116
- test ( 'computed key is only dynamic' , async ( ) => {
116
+ test ( 'computed key is only dynamic' , ( ) => {
117
117
const cls1 = differentCss ( { fontSize : 10 , [ `w${ 'idth' } ` ] : 20 } )
118
118
const { container } = render ( < div className = { cls1 } /> )
119
119
expect ( container . firstChild ) . toMatchSnapshot ( )
120
120
} )
121
121
122
- test ( 'composition with objects' , async ( ) => {
122
+ test ( 'composition with objects' , ( ) => {
123
123
const cls1 = differentCss ( {
124
124
display : 'flex' ,
125
125
width : 30 ,
@@ -141,7 +141,7 @@ describe('css', () => {
141
141
const { container } = render ( < div className = { cls2 } /> )
142
142
expect ( container . firstChild ) . toMatchSnapshot ( )
143
143
} )
144
- test ( '@supports' , async ( ) => {
144
+ test ( '@supports' , ( ) => {
145
145
const cls1 = differentCss `
146
146
@supports (display: grid) {
147
147
display: grid;
@@ -150,7 +150,7 @@ describe('css', () => {
150
150
const { container } = render ( < div className = { cls1 } /> )
151
151
expect ( container . firstChild ) . toMatchSnapshot ( )
152
152
} )
153
- test . skip ( 'nested at rules' , async ( ) => {
153
+ test . skip ( 'nested at rules' , ( ) => {
154
154
const cls1 = differentCss `
155
155
@supports (display: grid) {
156
156
display: grid;
@@ -168,7 +168,7 @@ describe('css', () => {
168
168
const { container } = render ( < div className = { cls1 } /> )
169
169
expect ( container . firstChild ) . toMatchSnapshot ( )
170
170
} )
171
- test ( 'nested array' , async ( ) => {
171
+ test ( 'nested array' , ( ) => {
172
172
const cls1 = differentCss ( [
173
173
[ { display : 'inline' } ] ,
174
174
[ { display : 'inline-block' } ] ,
@@ -193,25 +193,25 @@ describe('css', () => {
193
193
expect ( container . firstChild ) . toMatchSnapshot ( )
194
194
} )
195
195
196
- test ( 'explicit false' , async ( ) => {
196
+ test ( 'explicit false' , ( ) => {
197
197
const cls1 = differentCss ( false )
198
198
const { container } = render ( < div className = { cls1 } /> )
199
199
expect ( container . firstChild ) . toMatchSnapshot ( )
200
200
} )
201
201
202
- test ( 'array with explicit false' , async ( ) => {
202
+ test ( 'array with explicit false' , ( ) => {
203
203
const cls1 = differentCss ( [ [ { display : 'flex' } ] , false ] )
204
204
const { container } = render ( < div className = { cls1 } /> )
205
205
expect ( container . firstChild ) . toMatchSnapshot ( )
206
206
} )
207
207
208
- test ( 'array with explicit true' , async ( ) => {
208
+ test ( 'array with explicit true' , ( ) => {
209
209
const cls1 = differentCss ( [ [ { display : 'flex' } ] , true ] )
210
210
const { container } = render ( < div className = { cls1 } /> )
211
211
expect ( container . firstChild ) . toMatchSnapshot ( )
212
212
} )
213
213
214
- test ( 'nested' , async ( ) => {
214
+ test ( 'nested' , ( ) => {
215
215
const cls1 = differentCss `
216
216
color: yellow;
217
217
& .some-class {
@@ -234,7 +234,7 @@ describe('css', () => {
234
234
235
235
expect ( container . firstChild ) . toMatchSnapshot ( )
236
236
} )
237
- test ( 'explicit &' , async ( ) => {
237
+ test ( 'explicit &' , ( ) => {
238
238
flush ( )
239
239
const cls1 = differentCss `
240
240
&.another-class {
@@ -247,32 +247,32 @@ describe('css', () => {
247
247
expect ( sheet ) . toMatchSnapshot ( )
248
248
flush ( )
249
249
} )
250
- test ( 'falsy property value in object' , async ( ) => {
250
+ test ( 'falsy property value in object' , ( ) => {
251
251
const cls = differentCss ( { display : 'flex' , backgroundColor : undefined } )
252
252
const { container } = render ( < div className = { cls } /> )
253
253
expect ( container . firstChild ) . toMatchSnapshot ( )
254
254
} )
255
- test ( 'registered styles as nested selector value in object' , async ( ) => {
255
+ test ( 'registered styles as nested selector value in object' , ( ) => {
256
256
const cls = differentCss ( { display : 'flex' , backgroundColor : 'hotpink' } )
257
257
const cls1 = differentCss ( { ':hover' : cls } )
258
258
const { container } = render ( < div className = { cls1 } /> )
259
259
expect ( container . firstChild ) . toMatchSnapshot ( )
260
260
} )
261
- test ( 'composition stuff' , async ( ) => {
261
+ test ( 'composition stuff' , ( ) => {
262
262
const cls1 = differentCss ( { justifyContent : 'center' } )
263
263
const cls2 = differentCss ( [ cls1 ] )
264
264
const { container : container1 } = render ( < div className = { cls1 } /> )
265
265
expect ( container1 . firstChild ) . toMatchSnapshot ( )
266
266
const { container : container2 } = render ( < div className = { cls2 } /> )
267
267
expect ( container2 . firstChild ) . toMatchSnapshot ( )
268
268
} )
269
- test ( 'null rule' , async ( ) => {
269
+ test ( 'null rule' , ( ) => {
270
270
const cls1 = differentCss ( )
271
271
272
272
const { container } = render ( < div className = { cls1 } /> )
273
273
expect ( container . firstChild ) . toMatchSnapshot ( )
274
274
} )
275
- test ( 'css variables' , async ( ) => {
275
+ test ( 'css variables' , ( ) => {
276
276
const cls1 = differentCss `
277
277
--some-var: 1px;
278
278
width: var(--some-var);
@@ -281,7 +281,7 @@ describe('css', () => {
281
281
expect ( container . firstChild ) . toMatchSnapshot ( )
282
282
} )
283
283
284
- test ( 'null value' , async ( ) => {
284
+ test ( 'null value' , ( ) => {
285
285
const cls1 = differentCss ( null )
286
286
const cls2 = differentCss `
287
287
${ null } ;
@@ -294,7 +294,7 @@ describe('css', () => {
294
294
) . toMatchSnapshot ( )
295
295
} )
296
296
297
- test ( 'flushes correctly' , async ( ) => {
297
+ test ( 'flushes correctly' , ( ) => {
298
298
const cls1 = differentCss `
299
299
display: flex;
300
300
`
@@ -304,7 +304,7 @@ describe('css', () => {
304
304
const { container : container2 } = render ( < div className = { cls1 } /> )
305
305
expect ( container2 . firstChild ) . toMatchSnapshot ( )
306
306
} )
307
- test ( 'media query specificity' , async ( ) => {
307
+ test ( 'media query specificity' , ( ) => {
308
308
flush ( )
309
309
const cls = differentCss `
310
310
width: 32px;
@@ -322,7 +322,7 @@ describe('css', () => {
322
322
expect ( container . firstChild ) . toMatchSnapshot ( )
323
323
flush ( )
324
324
} )
325
- test ( 'weakmap' , async ( ) => {
325
+ test ( 'weakmap' , ( ) => {
326
326
const styles = { display : 'flex' }
327
327
const cls1 = differentCss ( styles )
328
328
const cls2 = differentCss ( styles )
@@ -332,7 +332,7 @@ describe('css', () => {
332
332
expect ( container2 . firstChild ) . toMatchSnapshot ( )
333
333
} )
334
334
335
- test ( 'manually use label property' , async ( ) => {
335
+ test ( 'manually use label property' , ( ) => {
336
336
flush ( )
337
337
const cls1 = differentCss `
338
338
color: hotpink;
@@ -342,7 +342,7 @@ describe('css', () => {
342
342
expect ( container . firstChild ) . toMatchSnapshot ( )
343
343
expect ( sheet ) . toMatchSnapshot ( )
344
344
} )
345
- test ( 'sets correct nonce value' , async ( ) => {
345
+ test ( 'sets correct nonce value' , ( ) => {
346
346
flush ( )
347
347
differentCss `
348
348
color: hotpink;
0 commit comments