diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mocha/minify.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/mocha/minify.js b/test/mocha/minify.js index baac2a41..2cc800fe 100644 --- a/test/mocha/minify.js +++ b/test/mocha/minify.js @@ -182,4 +182,13 @@ describe("minify", function() { }); }); + describe("Compressor", function() { + it("should be backward compatible with ast.transform(compressor)", function() { + var ast = Uglify.parse("function f(a){for(var i=0;i<a;i++)console.log(i)}"); + ast.figure_out_scope(); + ast = ast.transform(Uglify.Compressor()); + assert.strictEqual(ast.print_to_string(), "function f(a){for(var i=0;i<a;i++)console.log(i)}"); + }); + }) + }); |