@@ -1790,3 +1790,31 @@ it.each([
17901790
17911791 expect ( run ( rawCandidate , { utilities, variants } ) ) . toEqual ( [ ] )
17921792} )
1793+
1794+ it . each ( [
1795+ // Arbitrary properties with `;` or ` }`
1796+ '[color:red;color:blue]' ,
1797+ '[color:red}html{color:blue]' ,
1798+
1799+ // Arbitrary values that end the declaration
1800+ 'bg-[red;color:blue]' ,
1801+
1802+ // Arbitrary values that end the block
1803+ 'bg-[red}html{color:blue]' ,
1804+
1805+ // Arbitrary variants that end the block
1806+ '[&{color:red}]:flex' ,
1807+
1808+ // Arbitrary variant values that end the block
1809+ 'data-[a]{color:red}foo[a]:flex' ,
1810+ ] ) ( 'should not parse invalid arbitrary values: %s' , ( rawCandidate ) => {
1811+ let utilities = new Utilities ( )
1812+ utilities . static ( 'flex' , ( ) => [ ] )
1813+ utilities . functional ( 'bg' , ( ) => [ ] )
1814+
1815+ let variants = new Variants ( )
1816+ variants . functional ( 'data' , ( ) => { } )
1817+ variants . compound ( 'group' , Compounds . StyleRules , ( ) => { } )
1818+
1819+ expect ( run ( rawCandidate , { utilities, variants } ) ) . toEqual ( [ ] )
1820+ } )
0 commit comments