-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathfactory.ts
More file actions
33 lines (30 loc) · 766 Bytes
/
factory.ts
File metadata and controls
33 lines (30 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { HarnessPlatform } from '@react-native-harness/platforms';
import {
type AndroidEmulator,
type AndroidPlatformConfig,
type PhysicalAndroidDevice,
type AndroidEmulatorAVDConfig,
} from './config.js';
export const androidEmulator = (
name: string,
avd?: AndroidEmulatorAVDConfig
): AndroidEmulator => ({
type: 'emulator',
name,
avd,
});
export const physicalAndroidDevice = (
manufacturer: string,
model: string
): PhysicalAndroidDevice => ({
type: 'physical',
manufacturer: manufacturer.toLowerCase(),
model: model.toLowerCase(),
});
export const androidPlatform = (
config: AndroidPlatformConfig
): HarnessPlatform<AndroidPlatformConfig> => ({
name: config.name,
config,
runner: import.meta.resolve('./runner.js'),
});