Skip to content

Commit 6dcd752

Browse files
committed
Merge branch 'fix-list-ios-devices' of github.com:adamTrz/cli into fix-list-ios-devices
2 parents 58c705c + 9f7dd19 commit 6dcd752

File tree

3 files changed

+2
-40
lines changed

3 files changed

+2
-40
lines changed

packages/cli-platform-ios/src/commands/runIOS/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ async function runIOS(_: Array<string>, ctx: Config, args: FlagsT) {
184184
}
185185
} else if (modifiedArgs.device) {
186186
const physicalDevices = availableDevices.filter(
187-
(d) => d.type !== 'simulator',
187+
({type}) => type !== 'simulator',
188188
);
189189
const device = matchingDevice(physicalDevices, modifiedArgs.device);
190190
if (device) {

packages/cli-platform-ios/src/tools/__tests__/findMatchingSimulator.test.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -888,43 +888,6 @@ describe('findMatchingSimulator', () => {
888888
).toEqual(null);
889889
});
890890

891-
it('should return AppleTV devices if in the list', () => {
892-
expect(
893-
findMatchingSimulator(
894-
{
895-
devices: {
896-
'com.apple.CoreSimulator.SimRuntime.tvOS-11-2': [
897-
{
898-
state: 'Booted',
899-
availability: '(available)',
900-
name: 'Apple TV',
901-
udid: '816C30EA-38EA-41AC-BFDA-96FB632D522E',
902-
},
903-
{
904-
state: 'Shutdown',
905-
availability: '(available)',
906-
name: 'Apple TV 4K',
907-
udid: 'BCBB7E4B-D872-4D61-BC61-7C9805551075',
908-
},
909-
{
910-
state: 'Shutdown',
911-
availability: '(available)',
912-
name: 'Apple TV 4K (at 1080p)',
913-
udid: '1DE12308-1C14-4F0F-991E-A3ADC41BDFFC',
914-
},
915-
],
916-
},
917-
},
918-
{simulator: 'Apple TV'},
919-
),
920-
).toEqual({
921-
udid: '816C30EA-38EA-41AC-BFDA-96FB632D522E',
922-
name: 'Apple TV',
923-
booted: true,
924-
version: 'tvOS 11.2',
925-
});
926-
});
927-
928891
it('should return a simulator by UDID', () => {
929892
expect(
930893
findMatchingSimulator(

packages/cli-platform-ios/src/tools/listIOSDevices.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ const parseXcdeviceList = (text: string): Device[] => {
5454

5555
async function listIOSDevices(): Promise<Device[]> {
5656
const out = execa.sync('xcrun', ['xcdevice', 'list']).stdout;
57-
const devices = parseXcdeviceList(out);
58-
return devices;
57+
return parseXcdeviceList(out);
5958
}
6059

6160
export default listIOSDevices;

0 commit comments

Comments
 (0)