@@ -53,7 +53,7 @@ test.describe('Custom colors for TailwindCSS v4 configuration', () => {
5353 expect ( css ) . toContain ( 'bg-atcoder' ) ;
5454 } ) ;
5555
56- test ( 'xs breakpoint is available (or custom breakpoints) ' , ( ) => {
56+ test ( 'xs breakpoint media queries are generated in CSS ' , ( ) => {
5757 const cssDir = resolve ( '.svelte-kit/output/client/_app/immutable/assets' ) ;
5858 const cssFiles = readdirSync ( cssDir )
5959 . filter ( ( f : string ) => f . endsWith ( '.css' ) )
@@ -62,14 +62,13 @@ test.describe('Custom colors for TailwindCSS v4 configuration', () => {
6262
6363 expect ( cssFiles . length ) . toBeGreaterThan ( 0 ) ;
6464
65- // Verify total CSS size from multiple files
66- const totalCssSize = cssFiles . slice ( 0 , 5 ) . reduce ( ( acc , f ) => {
67- const cssPath = resolve ( cssDir , f ) ;
68- const css = readFileSync ( cssPath , 'utf-8' ) ;
69- return acc + css . length ;
70- } , 0 ) ;
65+ // Merge all CSS files to verify xs breakpoint
66+ const allCss = cssFiles
67+ . map ( ( f : string ) => readFileSync ( resolve ( cssDir , f ) , 'utf-8' ) )
68+ . join ( '\n' ) ;
7169
72- // Verify CSS is generated properly (single file size may be small due to multiple files)
73- expect ( totalCssSize ) . toBeGreaterThan ( 5000 ) ;
70+ // Verify xs breakpoint media query is generated (26.25rem = 420px)
71+ // @media (min-width:26.25rem) confirms the xs breakpoint is defined correctly
72+ expect ( allCss ) . toMatch ( / @ m e d i a \( m i n - w i d t h : 2 6 \. 2 5 r e m \) / ) ;
7473 } ) ;
7574} ) ;
0 commit comments