in src/push/run-local.ts [74:99]
async function runTest(directory, schema: MonitorSchema) {
return new Promise<void>((resolve, reject) => {
const runTest = spawn(
'npx',
[
'@elastic/synthetics',
'.',
'--playwright-options',
JSON.stringify(schema.playwrightOptions),
'--params',
JSON.stringify(schema.params),
],
{
cwd: directory,
stdio: 'inherit',
}
);
runTest.on('close', resolve);
runTest.on('error', err => {
reject(
new Error(`Failed to execute @elastic/synthetics : ${err.message}`)
);
});
});
}