mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Continues from #46380. The PR migrates the unit test cases from the original repo into the Next.js repo.
20 lines
430 B
TypeScript
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}"`)
|
|
})
|
|
})
|