add 'empty' variant test
confirm generated output
This commit is contained in:
parent
d552e20096
commit
815d31d08d
1 changed files with 21 additions and 0 deletions
|
|
@ -431,6 +431,27 @@ test('it can generate even variants', () => {
|
|||
})
|
||||
})
|
||||
|
||||
test('it can generate empty variants', () => {
|
||||
const input = `
|
||||
@variants empty {
|
||||
.banana { color: yellow; }
|
||||
.chocolate { color: brown; }
|
||||
}
|
||||
`
|
||||
|
||||
const output = `
|
||||
.banana { color: yellow; }
|
||||
.chocolate { color: brown; }
|
||||
.empty\\:banana:empty { color: yellow; }
|
||||
.empty\\:chocolate:empty { color: brown; }
|
||||
`
|
||||
|
||||
return run(input).then((result) => {
|
||||
expect(result.css).toMatchCss(output)
|
||||
expect(result.warnings().length).toBe(0)
|
||||
})
|
||||
})
|
||||
|
||||
test('it can generate group-hover variants', () => {
|
||||
const input = `
|
||||
@variants group-hover {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue