From ed28ba6b327cf25a56baf4283056351310553a0d Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Tue, 17 May 2022 17:45:02 +0200 Subject: [PATCH] add simple test to proof that `.group-[:hover]` works for example --- tests/match-variants.test.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/match-variants.test.js b/tests/match-variants.test.js index 269edff522e9..13bbfb2a548b 100644 --- a/tests/match-variants.test.js +++ b/tests/match-variants.test.js @@ -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`
`, + }, + ], + 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; + } + `) + }) +})