test(sfc): test @media and @supports query for scoped css

This commit is contained in:
Evan You 2019-12-19 12:07:47 -05:00
parent bdbfead1e0
commit c73d889235

View File

@ -91,6 +91,18 @@ describe('SFC scoped CSS', () => {
)
})
test('media query', () => {
expect(compile(`@media print { .foo { color: red }}`)).toMatch(
/@media print {\s+\.foo\[test\] \{ color: red/
)
})
test('supports query', () => {
expect(
compile(`@supports(display: grid) { .foo { display: grid }}`)
).toMatch(/@supports\(display: grid\) {\s+\.foo\[test\] \{ display: grid/)
})
test('scoped keyframes', () => {
const style = compile(`
.anim {