Add test case for issue fixed by postcss-js 2.0.2

This commit is contained in:
Adam Wathan 2019-07-06 06:16:40 -04:00
parent da24fba5c2
commit 6f441a47a2

View file

@ -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(
[