tailwindcss/tests/negateValue.test.js
Robin Malfait 44b3b429a8
Cleanup oxide — Part #2 (#13312)
* remove all oxide related code

* Update lightningcss to version 1.24.1

* update tests to match bumped Lightning CSS output

---------

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2024-03-22 17:12:14 +01:00

15 lines
485 B
JavaScript

import negateValue from '../src/util/negateValue'
test('it negates numeric CSS values', () => {
expect(negateValue('5')).toEqual('-5')
expect(negateValue('10px')).toEqual('-10px')
expect(negateValue('18rem')).toEqual('-18rem')
expect(negateValue('-10')).toEqual('10')
expect(negateValue('-7ch')).toEqual('7ch')
})
test('values that cannot be negated become undefined', () => {
expect(negateValue('auto')).toBeUndefined()
expect(negateValue('cover')).toBeUndefined()
})