(command)
| 153 | const { fs, getStoredConfig, setTempFile } = createSetupFs(); |
| 154 | |
| 155 | const executor: CommandExecutor = async (command) => { |
| 156 | if (command[0] === 'xcrun' && command[1] === 'devicectl') { |
| 157 | setTempFile(command[5], mockDeviceListJson()); |
| 158 | return createMockCommandResponse({ |
| 159 | success: true, |
| 160 | output: '', |
| 161 | }); |
| 162 | } |
| 163 | |
| 164 | if (command.includes('--json')) { |
| 165 | return createMockCommandResponse({ |
| 166 | success: true, |
| 167 | output: JSON.stringify({ |
| 168 | devices: { |
| 169 | 'iOS 17.0': [ |
| 170 | { |
| 171 | name: 'iPhone 15', |
| 172 | udid: 'SIM-1', |
| 173 | state: 'Shutdown', |
| 174 | isAvailable: true, |
| 175 | }, |
| 176 | ], |
| 177 | }, |
| 178 | }), |
| 179 | }); |
| 180 | } |
| 181 | |
| 182 | if (command[0] === 'xcrun') { |
| 183 | return createMockCommandResponse({ |
| 184 | success: true, |
| 185 | output: `== Devices ==\n-- iOS 17.0 --\n iPhone 15 (SIM-1) (Shutdown)`, |
| 186 | }); |
| 187 | } |
| 188 | |
| 189 | return createMockCommandResponse({ |
| 190 | success: true, |
| 191 | output: `Information about workspace "App":\n Schemes:\n App`, |
| 192 | }); |
| 193 | }; |
| 194 | |
| 195 | const result = await runSetupWizard({ |
| 196 | cwd, |
no test coverage detected