aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/minify.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/mocha/minify.js')
-rw-r--r--test/mocha/minify.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/mocha/minify.js b/test/mocha/minify.js
index 70cf73ae..8fe1565f 100644
--- a/test/mocha/minify.js
+++ b/test/mocha/minify.js
@@ -95,4 +95,19 @@ describe("minify", function() {
assert.strictEqual(code, "var a=function(n){return n};");
});
});
+
+ describe("#__PURE__", function() {
+ it("should drop #__PURE__ hint after use", function() {
+ var result = Uglify.minify('//@__PURE__ comment1 #__PURE__ comment2\n foo(), bar();', {
+ fromString: true,
+ output: {
+ comments: "all",
+ beautify: false,
+ }
+ });
+ var code = result.code;
+ assert.strictEqual(code, "// comment1 comment2\nbar();");
+ });
+ });
+
});