Skip to content

Commit

Permalink
add test for case sensitivity with px
Browse files Browse the repository at this point in the history
  • Loading branch information
cuth committed Apr 27, 2017
1 parent 22898e3 commit a23d185
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/pxtorem-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ describe('value parsing', function () {

expect(processed).toBe(expected);
});

it('should not replace values with an uppercase P or X', function () {
var options = {
propList: ['*']
};
var rules = '.rule { width: calc(100% - 16PX); height: calc(100% - 20px); font-size: 12Px; line-height: 16px; }';
var expected = '.rule { width: calc(100% - 16PX); height: calc(100% - 1.25rem); font-size: 12Px; line-height: 1rem; }';
var processed = postcss(pxtorem(options)).process(rules).css;

expect(processed).toBe(expected);
});
});

describe('rootValue', function () {
Expand Down

0 comments on commit a23d185

Please sign in to comment.