@@ -196,11 +196,7 @@ mod tests {
196196 let dir = tempfile:: tempdir ( ) . unwrap ( ) ;
197197
198198 // Create a simple CSS file
199- fs:: write (
200- dir. path ( ) . join ( "style.css" ) ,
201- "body { color: red; }" ,
202- )
203- . unwrap ( ) ;
199+ fs:: write ( dir. path ( ) . join ( "style.css" ) , "body { color: red; }" ) . unwrap ( ) ;
204200
205201 // Create a font file referenced by CSS
206202 fs:: write ( dir. path ( ) . join ( "font.woff2" ) , b"fake-font-data" ) . unwrap ( ) ;
@@ -213,11 +209,7 @@ mod tests {
213209 . unwrap ( ) ;
214210
215211 // Create CSS files for @import testing
216- fs:: write (
217- dir. path ( ) . join ( "_partial.css" ) ,
218- "h1 { font-size: 2em; }" ,
219- )
220- . unwrap ( ) ;
212+ fs:: write ( dir. path ( ) . join ( "_partial.css" ) , "h1 { font-size: 2em; }" ) . unwrap ( ) ;
221213 fs:: write (
222214 dir. path ( ) . join ( "main.css" ) ,
223215 "@import \" _partial.css\" ;\n body { color: blue; }" ,
@@ -250,16 +242,14 @@ mod tests {
250242 let dir = setup_css_dir ( ) ;
251243 let output_dir = tempfile:: tempdir ( ) . unwrap ( ) ;
252244
253- let result = bundle_css (
254- & dir. path ( ) . join ( "main.css" ) ,
255- None ,
256- false ,
257- output_dir. path ( ) ,
258- )
259- . unwrap ( ) ;
245+ let result =
246+ bundle_css ( & dir. path ( ) . join ( "main.css" ) , None , false , output_dir. path ( ) ) . unwrap ( ) ;
260247
261248 // The bundled output should contain both the partial and the main styles
262- assert ! ( result. code. contains( "font-size" ) , "should contain @imported partial" ) ;
249+ assert ! (
250+ result. code. contains( "font-size" ) ,
251+ "should contain @imported partial"
252+ ) ;
263253 assert ! ( result. code. contains( "color" ) , "should contain main styles" ) ;
264254 }
265255
@@ -277,7 +267,10 @@ mod tests {
277267 . unwrap ( ) ;
278268
279269 // url() should have been rewritten to a fingerprinted filename
280- assert ! ( !result. code. contains( "url(font.woff2)" ) , "original url should be rewritten" ) ;
270+ assert ! (
271+ !result. code. contains( "url(font.woff2)" ) ,
272+ "original url should be rewritten"
273+ ) ;
281274 assert_eq ! ( result. copied_asset_filenames. len( ) , 1 ) ;
282275 assert ! ( result. copied_asset_filenames[ 0 ] . contains( "font" ) ) ;
283276 assert ! ( result. copied_asset_filenames[ 0 ] . ends_with( ".woff2" ) ) ;
@@ -305,13 +298,8 @@ mod tests {
305298 )
306299 . unwrap ( ) ;
307300
308- let minified = bundle_css (
309- & dir. path ( ) . join ( "style.css" ) ,
310- None ,
311- true ,
312- output_dir. path ( ) ,
313- )
314- . unwrap ( ) ;
301+ let minified =
302+ bundle_css ( & dir. path ( ) . join ( "style.css" ) , None , true , output_dir. path ( ) ) . unwrap ( ) ;
315303
316304 assert ! (
317305 minified. code. len( ) <= not_minified. code. len( ) ,
@@ -338,10 +326,18 @@ mod tests {
338326 . unwrap ( ) ;
339327
340328 // Should contain the tailwind output, not the original file content
341- assert ! ( result. code. contains( "margin" ) , "should use source_css content" ) ;
329+ assert ! (
330+ result. code. contains( "margin" ) ,
331+ "should use source_css content"
332+ ) ;
342333 // url() should still be rewritten and asset copied
343334 assert_eq ! ( result. copied_asset_filenames. len( ) , 1 ) ;
344- assert ! ( output_dir. path( ) . join( & result. copied_asset_filenames[ 0 ] ) . exists( ) ) ;
335+ assert ! (
336+ output_dir
337+ . path( )
338+ . join( & result. copied_asset_filenames[ 0 ] )
339+ . exists( )
340+ ) ;
345341 }
346342
347343 #[ test]
0 commit comments