From: vlakoff Date: Mon, 31 Oct 2016 21:32:26 +0000 (+0100) Subject: Add test when precision not castable to int X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=c56c8451750fb0988e882d7ce7f3c91517545976;p=clean-css.git Add test when precision not castable to int --- diff --git a/test/selectors/simple-test.js b/test/selectors/simple-test.js index 3f4584bd..edcd8d82 100644 --- a/test/selectors/simple-test.js +++ b/test/selectors/simple-test.js @@ -500,6 +500,22 @@ vows.describe('simple optimizations') ] }, { roundingPrecision: -1 }) ) + .addBatch( + propertyContext('rounding disabled when option value not castable to int', { + 'pixels': [ + 'a{transform:translateY(123.31135px)}', + [['transform', 'translateY(123.31135px)']] + ], + 'percents': [ + 'a{left:20.1231%}', + [['left', '20.1231%']] + ], + 'ems': [ + 'a{left:1.1231em}', + [['left', '1.1231em']] + ] + }, { roundingPrecision: '\'-1\'' }) + ) .addBatch( propertyContext('units', { 'pixels': [