diff --git a/tests/class-map.test.ts b/tests/class-map.test.ts index 7e1d814c..b3340743 100644 --- a/tests/class-map.test.ts +++ b/tests/class-map.test.ts @@ -249,7 +249,7 @@ test('class map has correct class groups at first part', () => { text: ['font-size', 'text-alignment', 'text-color', 'text-opacity', 'text-overflow'], to: ['gradient-to', 'gradient-to-pos'], top: ['top'], - touch: ['touch'], + touch: ['touch', 'touch-pz', 'touch-x', 'touch-y'], tracking: ['tracking'], transform: ['transform'], transition: ['transition'], diff --git a/tests/conflicts-across-class-groups.test.ts b/tests/conflicts-across-class-groups.test.ts index 2971edda..5f1c2ef9 100644 --- a/tests/conflicts-across-class-groups.test.ts +++ b/tests/conflicts-across-class-groups.test.ts @@ -18,3 +18,16 @@ test('ring and shadow classes do not create conflict', () => { expect(twMerge('shadow ring')).toBe('shadow ring') expect(twMerge('shadow-md ring-2')).toBe('shadow-md ring-2') }) + +test('touch classes do create conflicts correctly', () => { + expect(twMerge('touch-pan-x touch-pan-right')).toBe('touch-pan-right') + expect(twMerge('touch-none touch-pan-x')).toBe('touch-pan-x') + expect(twMerge('touch-pan-x touch-none')).toBe('touch-none') + expect(twMerge('touch-pan-x touch-pan-y touch-pinch-zoom')).toBe( + 'touch-pan-x touch-pan-y touch-pinch-zoom', + ) + expect(twMerge('touch-manipulation touch-pan-x touch-pan-y touch-pinch-zoom')).toBe( + 'touch-pan-x touch-pan-y touch-pinch-zoom', + ) + expect(twMerge('touch-pan-x touch-pan-y touch-pinch-zoom touch-auto')).toBe('touch-auto') +})