File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2514,6 +2514,26 @@ describe('@custom-variant', () => {
25142514 ) . rejects . toThrowErrorMatchingInlineSnapshot ( `[Error: \`@custom-variant\` cannot be nested.]` )
25152515 } )
25162516
2517+ test ( '@custom-variant must not have an empty selector' , ( ) => {
2518+ return expect (
2519+ compileCss ( css `
2520+ @custom-variant foo ();
2521+ ` ) ,
2522+ ) . rejects . toThrowErrorMatchingInlineSnapshot (
2523+ `[Error: \`@custom-variant foo ()\` selector is invalid.]` ,
2524+ )
2525+ } )
2526+
2527+ test ( '@custom-variant with multiple selectors, cannot be empty' , ( ) => {
2528+ return expect (
2529+ compileCss ( css `
2530+ @custom-variant foo (.foo , .bar , );
2531+ ` ) ,
2532+ ) . rejects . toThrowErrorMatchingInlineSnapshot (
2533+ `[Error: \`@custom-variant foo (.foo, .bar, )\` selector is invalid.]` ,
2534+ )
2535+ } )
2536+
25172537 test ( '@custom-variant with no body must include a selector' , ( ) => {
25182538 return expect (
25192539 compileCss ( css `
You can’t perform that action at this time.
0 commit comments