File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -17409,4 +17409,33 @@ describe('custom utilities', () => {
17409
17409
`[Error: You cannot \`@apply\` the \`hover:bar\` utility here because it creates a circular dependency.]` ,
17410
17410
)
17411
17411
} )
17412
+
17413
+ test ( 'custom utilities with `@apply` causing circular dependencies should error (multiple levels)' , async ( ) => {
17414
+ await expect ( ( ) =>
17415
+ compileCss (
17416
+ css `
17417
+ body {
17418
+ @apply foo;
17419
+ }
17420
+
17421
+ @utility foo {
17422
+ @apply flex-wrap hover:bar;
17423
+ }
17424
+
17425
+ @utility bar {
17426
+ @apply flex dark:baz;
17427
+ }
17428
+
17429
+ @utility baz {
17430
+ @apply flex-wrap hover:foo;
17431
+ }
17432
+
17433
+ @tailwind utilities;
17434
+ ` ,
17435
+ [ 'foo' , 'bar' ] ,
17436
+ ) ,
17437
+ ) . rejects . toThrowErrorMatchingInlineSnapshot (
17438
+ `[Error: You cannot \`@apply\` the \`hover:bar\` utility here because it creates a circular dependency.]` ,
17439
+ )
17440
+ } )
17412
17441
} )
You can’t perform that action at this time.
0 commit comments