aboutsummaryrefslogtreecommitdiff
path: root/test/jetstream.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-05-12 09:44:02 +0800
committerGitHub <noreply@github.com>2019-05-12 09:44:02 +0800
commit45fbdbc2dcede8115687ae02619854ed974c7d1f (patch)
treef3306f43cdfe86a61c33c98e470c1b574568f6b0 /test/jetstream.js
parent54cb67805532667af50947cc3846d2cacc2a0a1d (diff)
downloadtracifyjs-45fbdbc2dcede8115687ae02619854ed974c7d1f.tar.gz
tracifyjs-45fbdbc2dcede8115687ae02619854ed974c7d1f.zip
improve tests (#3408)
Diffstat (limited to 'test/jetstream.js')
-rw-r--r--test/jetstream.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/jetstream.js b/test/jetstream.js
index 2d85dfdd..e7c846e6 100644
--- a/test/jetstream.js
+++ b/test/jetstream.js
@@ -62,8 +62,17 @@ if (typeof phantom == "undefined") {
if (debug) {
console.log("http://localhost:" + port + "/");
} else {
- child_process.exec("npm install phantomjs-prebuilt@2.1.14 --no-save", function(error) {
- if (error) throw error;
+ child_process.spawn(process.platform == "win32" ? "npm.cmd" : "npm", [
+ "install",
+ "phantomjs-prebuilt@2.1.14",
+ "--no-audit",
+ "--no-optional",
+ "--no-save",
+ "--no-update-notifier",
+ ], {
+ stdio: [ "ignore", 1, 2 ]
+ }).on("exit", function(code) {
+ if (code) throw new Error("npm install failed!");
var program = require("phantomjs-prebuilt").exec(process.argv[1], port);
program.stdout.pipe(process.stdout);
program.stderr.pipe(process.stderr);