Skip to content

Commit

Permalink
add test case for arbitrary variant without & symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
dcastil committed Jan 26, 2025
1 parent e8531f8 commit bc46153
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions tests/arbitrary-variants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { expect, test } from 'vitest'
import { twMerge } from '../src'

test('basic arbitrary variants', () => {
expect(twMerge('[p]:underline [p]:line-through')).toBe('[p]:line-through')
expect(twMerge('[&>*]:underline [&>*]:line-through')).toBe('[&>*]:line-through')
expect(twMerge('[&>*]:underline [&>*]:line-through [&_div]:line-through')).toBe(
'[&>*]:line-through [&_div]:line-through',
Expand Down
3 changes: 0 additions & 3 deletions tests/tailwind-css-versions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,4 @@ test('supports Tailwind CSS v4.0 features', () => {
expect(twMerge('font-stretch-expanded font-stretch-[66.66%] font-stretch-50%')).toBe(
'font-stretch-50%',
)

// TODO: Remove proto
expect(twMerge('')).toBe('')
})

0 comments on commit bc46153

Please sign in to comment.