fix: fix indentation, export ClassValue, add object-syntax test

This commit is contained in:
Ilia Mashkov
2026-04-18 15:52:05 +03:00
parent f4c95d5ea6
commit db2d7b78dd
3 changed files with 8 additions and 1 deletions
+6
View File
@@ -22,6 +22,12 @@ describe('cn', () => {
}) })
}) })
describe('object syntax', () => {
it('includes classes with truthy object values', () => {
expect(cn({ foo: true, bar: false })).toBe('foo')
})
})
describe('tailwind conflict resolution', () => { describe('tailwind conflict resolution', () => {
it('last padding wins', () => { it('last padding wins', () => {
expect(cn('px-2', 'px-4')).toBe('px-4') expect(cn('px-2', 'px-4')).toBe('px-4')
+1
View File
@@ -1 +1,2 @@
export { cn } from './cn' export { cn } from './cn'
export type { ClassValue } from 'clsx'