pngjs/test/run-compare.js
2015-08-06 13:12:14 +01:00

24 lines
No EOL
576 B
JavaScript

require("./http-server");
var path = require('path');
var childProcess = require('child_process');
var phantomjs = require('phantomjs');
var binPath = phantomjs.path;
var childArgs = [
path.join(__dirname, 'phantom-compare.js')
];
try {
console.log("Comparing in PhantomJS");
childProcess.execFile(binPath, childArgs, function (err, stdout, stderr) {
// handle results
console.log("Comparison Test Results:");
console.log(stdout);
process.exit(err ? 1 : 0);
});
} catch (e) {
console.log("Error starting phantomjs");
}