mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Add test to document that applying classes with pseudo-selectors is not supported
This commit is contained in:
parent
6807e45e1e
commit
afee4495d5
@ -37,5 +37,21 @@ test('applying classes that are ever used in a media query is not supported', ()
|
||||
test('it fails if the class does not exist', () => {
|
||||
run('.b { @apply .a; }').catch(error => {
|
||||
expect(error.reason).toEqual('No .a class found.')
|
||||
test('it does not match classes that include pseudo-selectors', () => {
|
||||
const input = `
|
||||
.a:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.b {
|
||||
@apply .a;
|
||||
}
|
||||
`
|
||||
expect.assertions(1)
|
||||
return run(input).catch(e => {
|
||||
expect(e).toMatchObject({ name: 'CssSyntaxError' })
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user