UNPKG

tia

Version:

Time is All (logs driven test engine with ExtJs support)

42 lines 1.53 kB
"use strict"; // This intermediate process is needed because WebStorm closes detached child processes // when stops debugging. var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); const fs = __importStar(require("fs")); const child_process_1 = require("child_process"); const errorReportFilePath = '/home/alexey/projects/work/tia-tests/fname'; process.on('message', data => { let child; try { child = child_process_1.spawn(data.chromeDriverPath, [`--port=${data.port}`], { detached: true, stdio: ['ignore', 'ignore', 'ignore'], }); // Save the pid. fs.writeFileSync(data.pidPath, child.pid, 'utf8'); } catch (err) { fs.appendFileSync(errorReportFilePath, `${err}\n`, 'utf8'); } setTimeout(() => { try { child.unref(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore process.send('chromedriver started'); process.disconnect(); process.exit(0); } catch (err) { fs.appendFileSync(errorReportFilePath, `${err}\n`, 'utf8'); } }, data.waitAfterStart); }); //# sourceMappingURL=remote-driver-utils-inner.js.map