See #560 - adds a test case to prevent future regressions.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Fri, 23 Dec 2016 17:24:56 +0000 (18:24 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Fri, 23 Dec 2016 17:24:56 +0000 (18:24 +0100)
test/source-map-test.js

index a5b01bb..7d1fa68 100644 (file)
@@ -82,6 +82,14 @@ vows.describe('source-map')
       'gets right output': function (minified) {
         assert.equal(minified.styles, ':root{--color:var(--otherColor)}');
       }
+    },
+    'empty rules and comments': {
+      'topic': function () {
+        return new CleanCSS({ sourceMap: true }).minify('p{/* comment */}');
+      },
+      'gets right output': function (minified) {
+        assert.equal(minified.styles, '');
+      }
     }
   })
   .addBatch({