(appPath: string, opts?: { args?: string[] })
| 28 | * In headless launch mode, `-g` is added so the app does not become foreground. |
| 29 | */ |
| 30 | export function buildOpenAppCommand(appPath: string, opts?: { args?: string[] }): string[] { |
| 31 | const command: string[] = ['open']; |
| 32 | if (isHeadlessLaunchMode()) { |
| 33 | command.push('-g'); |
| 34 | } |
| 35 | command.push(appPath); |
| 36 | if (opts?.args?.length) { |
| 37 | command.push('--args', ...opts.args); |
| 38 | } |
| 39 | return command; |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Build the argv to surface Simulator.app, or `null` to indicate the launch |
no test coverage detected