mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-15 18:54:56 -04:00
Convert test runner to headless
This commit is contained in:
parent
04df7a51d2
commit
3a90244af0
14 changed files with 1466 additions and 318 deletions
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);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue