diff --git a/src/types/domain/device.types.ts b/src/types/domain/device.types.ts index a6ca9d2..3cce15e 100644 --- a/src/types/domain/device.types.ts +++ b/src/types/domain/device.types.ts @@ -18,6 +18,8 @@ export enum EiOSDevices { 'ipad-pro-m5-13' = 'ipad-pro-m5-13', 'iphone-14' = 'iphone-14', 'iphone-16' = 'iphone-16', + 'iphone-16-pro' = 'iphone-16-pro', + 'iphone-16-pro-max' = 'iphone-16-pro-max', 'iphone-17' = 'iphone-17', 'iphone-18-pro' = 'iphone-18-pro', 'iphone-18-pro-max' = 'iphone-18-pro-max', @@ -39,6 +41,7 @@ export enum EAndroidDevices { export enum EiOSVersions { 'eighteen' = '18', + 'seventeen' = '17', 'twentySeven' = '27', 'twentySix' = '26', } diff --git a/test/unit/device-validation.service.test.ts b/test/unit/device-validation.service.test.ts index 51b8a7b..943020f 100644 --- a/test/unit/device-validation.service.test.ts +++ b/test/unit/device-validation.service.test.ts @@ -11,7 +11,7 @@ import type { CompatibilityData } from '../../src/utils/compatibility.js'; */ const compat: CompatibilityData = { ios: { - 'iphone-14': ['18'], + 'iphone-14': ['17', '18'], 'iphone-16': ['18', '26', '27'], 'iphone-17': ['26', '27'], 'iphone-19': ['28'], @@ -117,7 +117,7 @@ describe('DeviceValidationService', () => { it('rejects an unsupported explicit pair with the device\'s versions', () => { expect(() => ios('27', 'iphone-14')).to.throw( - /^iphone-14 only supports these iOS versions: 18$/, + /^iphone-14 only supports these iOS versions: 17, 18$/, ); expect(() => android('34', 'pixel-10')).to.throw( /^pixel-10 only supports these Android API levels: 36, 37$/, @@ -136,7 +136,7 @@ describe('DeviceValidationService', () => { describe('requests that rely on a default', () => { it('tells a device-only iOS request to pass the version explicitly', () => { expect(() => ios(undefined, 'iphone-14')).to.throw( - 'iphone-14 only supports these iOS versions: 18. No iOS version was given, so the default (26) was checked: pass one of those explicitly with --ios-version', + 'iphone-14 only supports these iOS versions: 17, 18. No iOS version was given, so the default (26) was checked: pass one of those explicitly with --ios-version', ); });