[Pkg-javascript-commits] [uglifyjs] 187/190: Introduce a test that tests the --self build

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Aug 7 23:17:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to annotated tag upstream/2.7.0
in repository uglifyjs.

commit debc525fa117438d4971df3790f9f476fed65858
Author: Richard van Velzen <rvanvelzen at experty.com>
Date:   Mon Jun 20 16:57:40 2016 +0200

    Introduce a test that tests the --self build
---
 test/mocha/cli.js | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/test/mocha/cli.js b/test/mocha/cli.js
new file mode 100644
index 0000000..38b57cd
--- /dev/null
+++ b/test/mocha/cli.js
@@ -0,0 +1,22 @@
+var assert = require("assert");
+var exec = require("child_process").exec;
+
+describe("bin/uglifyjs", function () {
+    it("should produce a functional build when using --self", function (done) {
+        this.timeout(5000);
+
+        var uglifyjs = '"' + process.argv[0] + '" bin/uglifyjs';
+        var command = uglifyjs + ' --self -cm --wrap WrappedUglifyJS';
+
+        exec(command, function (err, stdout) {
+            if (err) throw err;
+
+            eval(stdout);
+
+            assert.strictEqual(typeof WrappedUglifyJS, 'object');
+            assert.strictEqual(true, WrappedUglifyJS.parse('foo;') instanceof WrappedUglifyJS.AST_Node);
+
+            done();
+        });
+    });
+});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list