Add test when precision not castable to int
authorvlakoff <vlakoff@gmail.com>
Mon, 31 Oct 2016 21:32:26 +0000 (22:32 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Tue, 1 Nov 2016 06:52:11 +0000 (07:52 +0100)
test/selectors/simple-test.js

index 3f4584b..edcd8d8 100644 (file)
@@ -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': [