nightwatch
Version:
Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.
21 lines (20 loc) • 610 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Nightwatch = require('../../index');
function runWorkerTask({ argv, port1 }) {
const writeData = (data) => {
data = data.toString().trim();
if (data) {
port1.postMessage({
type: 'stdout',
data: data
});
}
};
process.stdout.write = writeData;
process.stderr.write = writeData;
//send reports to main thread using message port
process.port = port1;
return Nightwatch.runTests(argv, {});
}
module.exports = runWorkerTask;