mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Continues from #46380. The PR migrates the unit test cases from the original repo into the Next.js repo.
25 lines
591 B
TypeScript
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)}"`
|
|
)
|
|
})
|
|
})
|