Files
SukkaandGitHub 26768571ad test(unit): add cases for cssnano simple (#46862)
Continues from #46380. The PR migrates the unit test cases from the original repo into the Next.js repo.
2023-03-07 06:28:53 +00:00

25 lines
591 B
TypeScript

import postcss from 'postcss'
import mod from './plugin'
import css from '../noop-template'
describe('property sorting', () => {
test('should result in correct border width', async () => {
const input = css`
p {
border: 1px solid var(--test);
border-radius: var(--test);
border-width: 0;
}
`
const res = await postcss([mod]).process(input, {
from: 'input.css',
to: 'output.css',
})
expect(res.css).toMatchInlineSnapshot(
`"p{border-width:1px;border-radius:var(--test);border:0 solid var(--test)}"`
)
})
})