From 6f441a47a206b47d214dd2dcd7da21dcf330329f Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Sat, 6 Jul 2019 06:16:40 -0400 Subject: [PATCH] Add test case for issue fixed by postcss-js 2.0.2 --- __tests__/processPlugins.test.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/__tests__/processPlugins.test.js b/__tests__/processPlugins.test.js index 2d62ae323..e08b7472e 100644 --- a/__tests__/processPlugins.test.js +++ b/__tests__/processPlugins.test.js @@ -877,6 +877,31 @@ test('plugins respect prefix and important options by default when adding utilit `) }) +test('important utilities are not made double important when important option is used', () => { + const { utilities } = processPlugins( + [ + function({ addUtilities }) { + addUtilities({ + '.rotate-90': { + transform: 'rotate(90deg) !important', + }, + }) + }, + ], + makeConfig({ + important: true, + }) + ) + + expect(css(utilities)).toMatchCss(` + @variants { + .rotate-90 { + transform: rotate(90deg) !important + } + } + `) +}) + test("component declarations respect the 'prefix' option by default", () => { const { components } = processPlugins( [