(
device: DeviceInfo,
selector: DeviceSelector,
options: { includeExplicitSelectors?: boolean } = {},
)
| 292 | } |
| 293 | |
| 294 | export function matchesDeviceSelector( |
| 295 | device: DeviceInfo, |
| 296 | selector: DeviceSelector, |
| 297 | options: { includeExplicitSelectors?: boolean } = {}, |
| 298 | ): boolean { |
| 299 | return ( |
| 300 | matchesPlatformSelector(device, selector.platform) && |
| 301 | (!selector.target || (device.target ?? 'mobile') === selector.target) && |
| 302 | (!options.includeExplicitSelectors || matchesExplicitDeviceSelector(device, selector)) |
| 303 | ); |
| 304 | } |
| 305 | |
| 306 | function matchesExplicitDeviceSelector(device: DeviceInfo, selector: DeviceSelector): boolean { |
| 307 | if (selector.udid && !(device.id === selector.udid && isApplePlatform(device.platform))) { |
no test coverage detected