Adds tests for removing empty @media queries.
authorGoalSmashers <jakub@goalsmashers.com>
Mon, 8 Jul 2013 14:39:15 +0000 (16:39 +0200)
committerGoalSmashers <jakub@goalsmashers.com>
Mon, 8 Jul 2013 14:39:50 +0000 (16:39 +0200)
test/unit-test.js

index e2c7d8b..6732a58 100644 (file)
@@ -758,6 +758,20 @@ title']",
       "@media screen{.some{display:none}}"
     ]
   }, { removeEmpty: true }),
+  'empty @media': cssContext({
+    'simple': [
+      '@media print{}',
+      ''
+    ],
+    'simple with and': [
+      '@media print and screen{}',
+      ''
+    ],
+    'complex': [
+      '@media print, (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {\n}',
+      ''
+    ]
+  }, { removeEmpty: true }),
   'skip empty elements': cssContext({
     'empty #1': 'a{}',
     'empty #2': 'div>a{}',