Skip to content

Commit

Permalink
add simple test to proof that .group-[:hover] works for example
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed May 17, 2022
1 parent d588816 commit ed28ba6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/match-variants.test.js
Expand Up @@ -130,3 +130,27 @@ test('matched variant values maintain the sort order they are registered in', ()
`)
})
})

test('arbitrary matched variants work', () => {
let config = {
content: [
{
raw: html`<div class="group-[:hover]:underline"></div>`,
},
],
corePlugins: { preflight: false },
plugins: [],
}

let input = css`
@tailwind utilities;
`

return run(input, config).then((result) => {
expect(result.css).toMatchFormattedCss(css`
.group:hover .group-\[\:hover\]\:underline {
text-decoration-line: underline;
}
`)
})
})

0 comments on commit ed28ba6

Please sign in to comment.