diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-04-14 03:13:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 10:13:42 +0800 |
commit | c4d28e3b2a2d82c7e5e3b398513755b507a75e76 (patch) | |
tree | 955bed9c2cfb691ea84abf8476cc2dd0a507f907 /test/jetstream.js | |
parent | 77261e1ee037f3eea2d5ec80abb1387d4ba5c67e (diff) | |
download | tracifyjs-c4d28e3b2a2d82c7e5e3b398513755b507a75e76.tar.gz tracifyjs-c4d28e3b2a2d82c7e5e3b398513755b507a75e76.zip |
expand testing on Node.js versions (#3779)
Diffstat (limited to 'test/jetstream.js')
-rw-r--r-- | test/jetstream.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/jetstream.js b/test/jetstream.js index e7c846e6..834f2575 100644 --- a/test/jetstream.js +++ b/test/jetstream.js @@ -8,15 +8,14 @@ if (typeof phantom == "undefined") { require("../tools/exit"); var args = process.argv.slice(2); var debug = args.indexOf("--debug"); - if (debug >= 0) { + if (debug < 0) { + debug = false; + } else { args.splice(debug, 1); debug = true; - } else { - debug = false; - } - if (!args.length) { - args.push("-mcb", "beautify=false,webkit"); } + args.unshift("bin/uglifyjs"); + if (!args.length) args.push("-mcb", "beautify=false,webkit"); args.push("--timings"); var child_process = require("child_process"); var fetch = require("./fetch"); @@ -39,7 +38,7 @@ if (typeof phantom == "undefined") { }); if (/\.js$/.test(url)) { var stderr = ""; - var uglifyjs = child_process.fork("bin/uglifyjs", args, { + var uglifyjs = child_process.spawn(process.argv[0], args, { silent: true }).on("exit", function(code) { console.log("uglifyjs", url.slice(site.length + 1), args.join(" ")); |