Skip to content

Commit 6f441a4

Browse files
committed
Add test case for issue fixed by postcss-js 2.0.2
1 parent da24fba commit 6f441a4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

__tests__/processPlugins.test.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,31 @@ test('plugins respect prefix and important options by default when adding utilit
877877
`)
878878
})
879879

880+
test('important utilities are not made double important when important option is used', () => {
881+
const { utilities } = processPlugins(
882+
[
883+
function({ addUtilities }) {
884+
addUtilities({
885+
'.rotate-90': {
886+
transform: 'rotate(90deg) !important',
887+
},
888+
})
889+
},
890+
],
891+
makeConfig({
892+
important: true,
893+
})
894+
)
895+
896+
expect(css(utilities)).toMatchCss(`
897+
@variants {
898+
.rotate-90 {
899+
transform: rotate(90deg) !important
900+
}
901+
}
902+
`)
903+
})
904+
880905
test("component declarations respect the 'prefix' option by default", () => {
881906
const { components } = processPlugins(
882907
[

0 commit comments

Comments
 (0)