mirror of
https://github.com/gchq/CyberChef
synced 2025-12-16 08:13:53 +00:00
Convert test runner to headless
This commit is contained in:
24
test/NodeRunner.js
Normal file
24
test/NodeRunner.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* NodeRunner.js
|
||||
*
|
||||
* The purpose of this file is to execute via PhantomJS the file
|
||||
* PhantomRunner.js, because PhantomJS is managed by node.
|
||||
*
|
||||
* @author tlwr [toby@toby.codes
|
||||
*
|
||||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*
|
||||
*/
|
||||
var path = require("path");
|
||||
var phantomjs = require("phantomjs-prebuilt");
|
||||
|
||||
var phantomEntryPoint = path.join(__dirname, "PhantomRunner.js");
|
||||
var program = phantomjs.exec(phantomEntryPoint);
|
||||
|
||||
program.stdout.pipe(process.stdout);
|
||||
program.stderr.pipe(process.stderr);
|
||||
|
||||
program.on("exit", function(status) {
|
||||
process.exit(status);
|
||||
});
|
||||
Reference in New Issue
Block a user