From c4d28e3b2a2d82c7e5e3b398513755b507a75e76 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Tue, 14 Apr 2020 03:13:42 +0100 Subject: expand testing on Node.js versions (#3779) --- test/jetstream.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'test/jetstream.js') 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(" ")); -- cgit v1.2.3