Description
Following up on the already-filed basic `cn()` test issue, add specific coverage for conflicting Tailwind class resolution (e.g. `cn('p-2', 'p-4')` should resolve to a single winning padding class), which is the trickiest and most bug-prone part of a class-merge helper.
Location
`lib/utils.ts:4`
Task
Add test cases specifically for conflicting utility classes of the same category (padding, margin, color, etc.), asserting the merge helper resolves them the same way `tailwind-merge` (or whatever underlying library is used) is documented to.
Good for contributors because
Narrow, well-defined edge case with clear expected behavior to assert against.
Description
Following up on the already-filed basic `cn()` test issue, add specific coverage for conflicting Tailwind class resolution (e.g. `cn('p-2', 'p-4')` should resolve to a single winning padding class), which is the trickiest and most bug-prone part of a class-merge helper.
Location
`lib/utils.ts:4`
Task
Add test cases specifically for conflicting utility classes of the same category (padding, margin, color, etc.), asserting the merge helper resolves them the same way `tailwind-merge` (or whatever underlying library is used) is documented to.
Good for contributors because
Narrow, well-defined edge case with clear expected behavior to assert against.