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

20 lines
430 B
TypeScript

import postcss from 'postcss'
import mod from './plugin'
describe('with escaped selector', () => {
test('should not misplace the backslash', async () => {
const input = `
.foo\\,2 {
background: blue;
}
`
const res = await postcss([mod]).process(input, {
from: 'input.css',
to: 'output.css',
})
expect(res.css).toMatchInlineSnapshot(`".foo\\\\,2{background:blue}"`)
})
})