Test that class names in apply directives are escaped
This commit is contained in:
parent
9b9d8f374b
commit
c678d91fe0
1 changed files with 17 additions and 0 deletions
|
|
@ -14,6 +14,23 @@ test("it copies a class's declarations into itself", () => {
|
|||
})
|
||||
})
|
||||
|
||||
test('selectors with invalid characters do not need to be manually escaped', () => {
|
||||
const input = `
|
||||
.a\\:1\\/2 { color: red; }
|
||||
.b { @apply .a:1/2; }
|
||||
`
|
||||
|
||||
const expected = `
|
||||
.a\\:1\\/2 { color: red; }
|
||||
.b { color: red; }
|
||||
`
|
||||
|
||||
return run(input).then(result => {
|
||||
expect(result.css).toEqual(expected)
|
||||
expect(result.warnings().length).toBe(0)
|
||||
})
|
||||
})
|
||||
|
||||
test('it removes important from applied classes by default', () => {
|
||||
const input = `
|
||||
.a { color: red !important; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue