Skip to content

Commit 853d347

Browse files
committed
Add tests for pixrem "browsers" config
1 parent 4967fa9 commit 853d347

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/__tests__/option.browsers.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ tape("cssnext browsers option", function(t) {
4040
t.end()
4141
})
4242

43-
tape("cssnext browsers option propagation", function(t) {
43+
tape("cssnext browsers option propagation to autoprefixer", function(t) {
4444
const input = "body{transition: 1s}"
4545
const output = "body{-webkit-transition: 1s;transition: 1s}"
4646

@@ -60,3 +60,17 @@ tape("cssnext browsers option propagation", function(t) {
6060

6161
t.end()
6262
})
63+
64+
tape("cssnext browsers option propagation to pixrem", function(t) {
65+
const input = "body{font-size: 1rem}"
66+
const output = "body{font-size: 16px;font-size: 1rem}"
67+
68+
// IE 8 needs rem fallback
69+
t.equal(
70+
cssnext({ browsers: "ie 8" }).process(input).css,
71+
output,
72+
"should propagate browsers option to pixrem"
73+
)
74+
75+
t.end()
76+
})

0 commit comments

Comments
 (0)