Skip to content

Commit

Permalink
improve tests (#3408)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl committed May 12, 2019
1 parent 54cb678 commit 45fbdbc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 11 additions & 2 deletions test/jetstream.js
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions test/release/run.js
Expand Up @@ -6,10 +6,10 @@ module.exports = function(tasks) {
var args = tasks.shift();
console.log();
console.log("\u001B[36m$> " + args.join(" ") + "\u001B[39m");
var result = child_process.spawn(process.argv[0], args, {
child_process.spawn(process.argv[0], args, {
stdio: [ "ignore", 1, 2 ]
}).on("exit", function(code) {
if (code != 0) process.exit(code);
if (code) process.exit(code);
next();
});
})();
Expand Down

0 comments on commit 45fbdbc

Please sign in to comment.