Skip to content

Commit

Permalink
Add test to ensure rem are not added when they should not
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Mar 13, 2016
1 parent f550d4b commit 47dd159
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/__tests__/option.browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,21 @@ tape("cssnext browsers option propagation to pixrem", function(t) {
"should propagate browsers option to pixrem"
)

// IE 9 doesn't need rem fallback on a simple font-size
t.equal(
cssnext({ browsers: "ie 9" }).process(input).css,
input,
"should propagate browsers option to pixrem"
)

// IE 9 needs rem on pseudo element
const inputWeirdCase = input.replace("body", "body::before")
const outputWeirdCase = output.replace("body", "body::before")
t.equal(
cssnext({ browsers: "ie 9" }).process(inputWeirdCase).css,
outputWeirdCase,
"should propagate browsers option to pixrem"
)

t.end()
})

0 comments on commit 47dd159

Please sign in to comment.