diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-12-24 12:38:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-24 12:38:45 +0800 |
commit | efffb817357898f3a05d24fdddbf3280e33bf880 (patch) | |
tree | dda34208d6ed4a27646562c22ed7d4c3c3c921e6 /test/mocha/minify.js | |
parent | 202f90ef8f2b282fbd5c063a7e5a34f79551099e (diff) | |
download | tracifyjs-efffb817357898f3a05d24fdddbf3280e33bf880.tar.gz tracifyjs-efffb817357898f3a05d24fdddbf3280e33bf880.zip |
fix comments output & improve `/*@__PURE__*/`
- fix whitespace around comments
- fix comment parsing around parentheses
- consider parentheses when parsing `/*@__PURE__*/`
- remove all `/*@__PURE__*/` on output
fixes #2638
Diffstat (limited to 'test/mocha/minify.js')
-rw-r--r-- | test/mocha/minify.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/mocha/minify.js b/test/mocha/minify.js index 5d9512f3..5fa9254b 100644 --- a/test/mocha/minify.js +++ b/test/mocha/minify.js @@ -247,7 +247,7 @@ describe("minify", function() { var code = result.code; assert.strictEqual(code, "// comment1 comment2\nbar();"); }); - it("should not drop #__PURE__ hint if function is retained", function() { + it("should drop #__PURE__ hint if function is retained", function() { var result = Uglify.minify("var a = /*#__PURE__*/(function(){ foo(); })();", { output: { comments: "all", @@ -255,7 +255,7 @@ describe("minify", function() { } }); var code = result.code; - assert.strictEqual(code, "var a=/*#__PURE__*/function(){foo()}();"); + assert.strictEqual(code, "var a=/* */function(){foo()}();"); }) }); |