UNPKG

askui

Version:

Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on

25 lines (24 loc) 1.1 kB
export function createArgsWithDefaults(args) { const defaults = { actionDelayInMs: 1000, binaryVersion: 'latest', display: 0, host: '127.0.0.1', logLevel: 'debug', minimize: true, overWriteBinary: false, port: 6769, }; return Object.assign(defaults, args); } export function createCliFlagsFromArgs(args) { return [ `-d ${args.display.toString()}`, (args === null || args === void 0 ? void 0 : args.port) ? `-p ${args.port.toString()}` : '', (args === null || args === void 0 ? void 0 : args.actionDelayInMs) ? `--action_wait_time ${args.actionDelayInMs.toString()}` : '', (args === null || args === void 0 ? void 0 : args.host) ? `--host ${args.host}` : '', (args === null || args === void 0 ? void 0 : args.minimize) ? '-m ' : '', (args === null || args === void 0 ? void 0 : args.logLevel) ? `--log-level ${args.logLevel}` : '', (args === null || args === void 0 ? void 0 : args.logFilePath) ? `--log-file ${args.logFilePath}` : '', ].filter((arg) => !!arg); }