File tree Expand file tree Collapse file tree
packages/react/src/stores/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -353,6 +353,26 @@ mod tests {
353353 #[ case( "with-dash" , "with-dash" ) ]
354354 #[ case( "with_underscore" , "with_underscore" ) ]
355355 #[ case( "CamelCase123" , "CamelCase123" ) ]
356+ // Additional cases for full coverage of special characters
357+ #[ case( "<" , "_lt_" ) ]
358+ #[ case( "*" , "_st_" ) ]
359+ #[ case( "," , "_cm_" ) ]
360+ #[ case( "'" , "_sq_" ) ]
361+ #[ case( "/" , "_sl_" ) ]
362+ #[ case( "\\ " , "_bs_" ) ]
363+ #[ case( "%" , "_pc_" ) ]
364+ #[ case( "^" , "_cr_" ) ]
365+ #[ case( "$" , "_dl_" ) ]
366+ #[ case( "|" , "_pp_" ) ]
367+ #[ case( "@" , "_at_" ) ]
368+ #[ case( "!" , "_ex_" ) ]
369+ #[ case( "?" , "_qm_" ) ]
370+ #[ case( ";" , "_sc_" ) ]
371+ #[ case( "{" , "_lc_" ) ]
372+ #[ case( "}" , "_rc_" ) ]
373+ // Unicode character (non-ASCII)
374+ #[ case( "한글" , "_ud55c__uae00_" ) ]
375+ #[ case( "emoji😀" , "emoji_u1f600_" ) ]
356376 fn test_encode_selector ( #[ case] input : & str , #[ case] expected : & str ) {
357377 assert_eq ! ( encode_selector( input) , expected) ;
358378 }
Original file line number Diff line number Diff line change @@ -9422,6 +9422,12 @@ globalCss({
94229422 "@devup-ui/react" ,
94239423 true
94249424 ) ] // .jsx
9425+ #[ case(
9426+ "test.unknown" ,
9427+ "import { Box } from '@devup-ui/react';" ,
9428+ "@devup-ui/react" ,
9429+ false
9430+ ) ] // unsupported file extension
94259431 fn test_has_devup_ui (
94269432 #[ case] filename : & str ,
94279433 #[ case] code : & str ,
Original file line number Diff line number Diff line change @@ -521,33 +521,19 @@ impl StyleSheet {
521521 match kind {
522522 AtRuleKind :: Media => {
523523 // Combine @media queries with 'and'
524- format ! (
525- "@media(min-width:{break_point}px)and {query}{{{inner_css}}}"
526- )
524+ format ! ( "@media(min-width:{break_point}px)and {query}{{{inner_css}}}" )
527525 }
528526 AtRuleKind :: Supports => {
529527 // Nest @supports inside @media for breakpoint
530- format ! (
531- "@media(min-width:{break_point}px){{@supports{query}{{{inner_css}}}}}"
532- )
528+ format ! ( "@media(min-width:{break_point}px){{@supports{query}{{{inner_css}}}}}" )
533529 }
534530 AtRuleKind :: Container => {
535531 // Nest @container inside @media for breakpoint
536- format ! (
537- "@media(min-width:{break_point}px){{@container{query}{{{inner_css}}}}}"
538- )
532+ format ! ( "@media(min-width:{break_point}px){{@container{query}{{{inner_css}}}}}" )
539533 }
540534 }
541535 } else {
542- format ! (
543- "@{kind}{}{{{}}}" ,
544- if query. starts_with( "(" ) {
545- query. clone( )
546- } else {
547- format!( " {query}" )
548- } ,
549- inner_css. as_str( )
550- )
536+ format ! ( "@{kind}{}{{{}}}" , if query. starts_with( "(" ) { query. clone( ) } else { format!( " {query}" ) } , inner_css. as_str( ) )
551537 }
552538 . as_str ( ) ,
553539 ) ;
Original file line number Diff line number Diff line change 1+ // Import from bun-test-env-dom to enable DOM environment
2+ import 'bun-test-env-dom'
3+
14import {
25 afterAll ,
36 afterEach ,
You can’t perform that action at this time.
0 commit comments