File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -2514,6 +2514,26 @@ describe('@custom-variant', () => {
2514
2514
) . rejects . toThrowErrorMatchingInlineSnapshot ( `[Error: \`@custom-variant\` cannot be nested.]` )
2515
2515
} )
2516
2516
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
+
2517
2537
test ( '@custom-variant with no body must include a selector' , ( ) => {
2518
2538
return expect (
2519
2539
compileCss ( css `
You can’t perform that action at this time.
0 commit comments