@@ -1221,39 +1221,41 @@ test('collapse canonicalization is not affected by previous calls', { timeout },
12211221 ] )
12221222} )
12231223
1224- test ( 'collapse does not crash when utilities with no standard properties are present' , { timeout } , async ( ) => {
1225- let designSystem = await designSystems . get ( __dirname ) . get ( css `
1226- @import 'tailwindcss' ;
1227- ` )
1224+ test (
1225+ 'collapse does not crash when utilities with no standard properties are present' ,
1226+ { timeout } ,
1227+ async ( ) => {
1228+ let designSystem = await designSystems . get ( __dirname ) . get ( css `
1229+ @import 'tailwindcss' ;
1230+ ` )
12281231
1229- let options : CanonicalizeOptions = {
1230- collapse : true ,
1231- logicalToPhysical : true ,
1232- rem : 16 ,
1233- }
1232+ let options : CanonicalizeOptions = {
1233+ collapse : true ,
1234+ logicalToPhysical : true ,
1235+ rem : 16 ,
1236+ }
12341237
1235- // Shadow utilities use CSS custom properties and @property rules but may
1236- // produce empty property maps in the collapse algorithm. This should not
1237- // crash with "Cannot read properties of null" or "X is not iterable".
1238- expect ( ( ) =>
1239- designSystem . canonicalizeCandidates ( [ 'shadow-sm' , 'border' ] , options ) ,
1240- ) . not . toThrow ( )
1238+ // Shadow utilities use CSS custom properties and @property rules but may
1239+ // produce empty property maps in the collapse algorithm. This should not
1240+ // crash with "Cannot read properties of null" or "X is not iterable".
1241+ expect ( ( ) =>
1242+ designSystem . canonicalizeCandidates ( [ 'shadow-sm' , 'border' ] , options ) ,
1243+ ) . not . toThrow ( )
12411244
1242- expect ( ( ) =>
1243- designSystem . canonicalizeCandidates ( [ 'shadow-md' , 'p-4' ] , options ) ,
1244- ) . not . toThrow ( )
1245+ expect ( ( ) => designSystem . canonicalizeCandidates ( [ 'shadow-md' , 'p-4' ] , options ) ) . not . toThrow ( )
12451246
1246- expect ( ( ) =>
1247- designSystem . canonicalizeCandidates ( [ 'shadow-sm' , 'shadow-md' ] , options ) ,
1248- ) . not . toThrow ( )
1247+ expect ( ( ) =>
1248+ designSystem . canonicalizeCandidates ( [ 'shadow-sm' , 'shadow-md' ] , options ) ,
1249+ ) . not . toThrow ( )
12491250
1250- // Verify the candidates are returned (not collapsed, since shadows can't
1251- // meaningfully collapse with unrelated utilities)
1252- expect (
1253- designSystem . canonicalizeCandidates ( [ 'shadow-sm' , 'border' ] , options ) ,
1254- ) . toEqual ( expect . arrayContaining ( [ 'shadow-sm' , 'border' ] ) )
1251+ // Verify the candidates are returned (not collapsed, since shadows can't
1252+ // meaningfully collapse with unrelated utilities)
1253+ expect ( designSystem . canonicalizeCandidates ( [ 'shadow-sm' , 'border' ] , options ) ) . toEqual (
1254+ expect . arrayContaining ( [ 'shadow-sm' , 'border' ] ) ,
1255+ )
12551256
1256- expect (
1257- designSystem . canonicalizeCandidates ( [ 'shadow-sm' , 'shadow-md' ] , options ) ,
1258- ) . toEqual ( expect . arrayContaining ( [ 'shadow-sm' , 'shadow-md' ] ) )
1259- } )
1257+ expect ( designSystem . canonicalizeCandidates ( [ 'shadow-sm' , 'shadow-md' ] , options ) ) . toEqual (
1258+ expect . arrayContaining ( [ 'shadow-sm' , 'shadow-md' ] ) ,
1259+ )
1260+ } ,
1261+ )
0 commit comments