diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-05-08 03:24:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-08 03:24:42 +0800 |
commit | 4f8ca4626efb15dc986785c89c51cbb3061e5f32 (patch) | |
tree | 868a08425b50c70f0654a7ee675851da2633a53a /test/mocha/spidermonkey.js | |
parent | e54748365cba0509c82c089cdc2ef6a8bb1a724b (diff) | |
download | tracifyjs-4f8ca4626efb15dc986785c89c51cbb3061e5f32.tar.gz tracifyjs-4f8ca4626efb15dc986785c89c51cbb3061e5f32.zip |
deprecate low level API (#1877)
fixes #1872
Diffstat (limited to 'test/mocha/spidermonkey.js')
-rw-r--r-- | test/mocha/spidermonkey.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/test/mocha/spidermonkey.js b/test/mocha/spidermonkey.js index e5bf45a2..4071a136 100644 --- a/test/mocha/spidermonkey.js +++ b/test/mocha/spidermonkey.js @@ -1,6 +1,6 @@ var assert = require("assert"); var exec = require("child_process").exec; -var uglify = require("../../"); +var uglify = require("../node"); describe("spidermonkey export/import sanity test", function() { it("should produce a functional build when using --self with spidermonkey", function(done) { @@ -15,18 +15,7 @@ describe("spidermonkey export/import sanity test", function() { eval(stdout); assert.strictEqual(typeof SpiderUglify, "object"); - - var ast = SpiderUglify.parse("foo([true,,2+3]);"); - assert.strictEqual(true, ast instanceof SpiderUglify.AST_Node); - - ast.figure_out_scope(); - ast = SpiderUglify.Compressor({}).compress(ast); - assert.strictEqual(true, ast instanceof SpiderUglify.AST_Node); - - var stream = SpiderUglify.OutputStream({}); - ast.print(stream); - var code = stream.toString(); - assert.strictEqual(code, "foo([!0,,5]);"); + assert.strictEqual(SpiderUglify.minify("foo([true,,2+3]);").code, "foo([!0,,5]);"); done(); }); |