Skip to content

Commit 90cdd69

Browse files
committed
add test for arbitrary variants with arbitrary properties
1 parent 947aa04 commit 90cdd69

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/arbitrary-variants.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,12 @@ test('multiple arbitrary variants', () => {
7272
'hover:dark:[&>*]:focus:[&_div]:disabled:underline dark:hover:[&>*]:disabled:focus:[&_div]:line-through'
7373
)
7474
})
75+
76+
test('arbitrary variants with arbitrary properties', () => {
77+
expect(twMerge('[&>*]:[color:red] [&>*]:[color:blue]')).toBe('[&>*]:[color:blue]')
78+
expect(
79+
twMerge(
80+
'[&[data-foo][data-bar]:not([data-baz])]:nod:noa:[color:red] [&[data-foo][data-bar]:not([data-baz])]:noa:nod:[color:blue]'
81+
)
82+
).toBe('[&[data-foo][data-bar]:not([data-baz])]:noa:nod:[color:blue]')
83+
})

0 commit comments

Comments
 (0)