run-headless-chromium
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "run-headless-chromium", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Run Chromium or Google Chrome in headless mode and forward the JS console output to the standard output.", | ||
@@ -5,0 +5,0 @@ "author": "Rob Wu <rob@robwu.nl> (https://robwu.nl/)", |
@@ -9,3 +9,3 @@ #!/usr/bin/env node | ||
var path = require('path'); | ||
var rmraf = require('rmraf'); | ||
var rmraf = require('rimraf'); | ||
var spawn = require('child_process').spawn; | ||
@@ -114,2 +114,3 @@ var whichSync = require('which').sync; | ||
crProcessExited = true; | ||
quitXvfbAndChromium(); | ||
}); | ||
@@ -159,2 +160,4 @@ _toggle_crProcessEvents(true); | ||
printJsConsoleMessage(line); | ||
} else if (!r_logMessageIgnore.test(line)) { | ||
console.log(line); | ||
} | ||
@@ -176,3 +179,3 @@ return; | ||
if (log_severity == 'INFO' && log_message == 'All tests completed!') { | ||
quitChromium(); | ||
quitXvfbAndChromium(); | ||
} | ||
@@ -189,3 +192,9 @@ } else { | ||
function quitChromium() { | ||
var hasQuitChromium = false; | ||
function quitXvfbAndChromium() { | ||
if (hasQuitChromium) { | ||
return; | ||
} | ||
hasQuitChromium = true; | ||
_toggle_crProcessEvents(false); | ||
@@ -192,0 +201,0 @@ xvfb.stop(function(err) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10375
191