Test preservation of script element with src attr
authorDuncan Beevers <duncan@dweebd.com>
Tue, 2 Sep 2014 13:28:24 +0000 (08:28 -0500)
committerDuncan Beevers <duncan@dweebd.com>
Tue, 2 Sep 2014 13:28:24 +0000 (08:28 -0500)
tests/minifier.js

index ccb28df..4fb85d0 100644 (file)
     input = '<p><!-- x --></p>';
     output = '';
     equal(minify(input, { removeEmptyElements: true }), output);
+
+    input = '<script src="foo.js"></script>';
+    equal(minify(input, { removeEmptyElements: true }), input);
+    input = '<script></script>';
+    equal(minify(input, { removeEmptyElements: true }), '');
   });
 
   test('collapsing boolean attributes', function() {