Skip to content

Commit 47dd159

Browse files
committed
Add test to ensure rem are not added when they should not
Ref MoOx#264
1 parent f550d4b commit 47dd159

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/__tests__/option.browsers.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,21 @@ tape("cssnext browsers option propagation to pixrem", function(t) {
7272
"should propagate browsers option to pixrem"
7373
)
7474

75+
// IE 9 doesn't need rem fallback on a simple font-size
76+
t.equal(
77+
cssnext({ browsers: "ie 9" }).process(input).css,
78+
input,
79+
"should propagate browsers option to pixrem"
80+
)
81+
82+
// IE 9 needs rem on pseudo element
83+
const inputWeirdCase = input.replace("body", "body::before")
84+
const outputWeirdCase = output.replace("body", "body::before")
85+
t.equal(
86+
cssnext({ browsers: "ie 9" }).process(inputWeirdCase).css,
87+
outputWeirdCase,
88+
"should propagate browsers option to pixrem"
89+
)
90+
7591
t.end()
7692
})

0 commit comments

Comments
 (0)