From a61ab60796ec2a8a5bc7fdbfdf0c65caa961669c Mon Sep 17 00:00:00 2001 From: wusumac <736139669@qq.com> Date: Fri, 6 Nov 2026 19:55:47 +0800 Subject: [PATCH] test(cli): accept Mac Catalyst iOS version configs Upstream added two more MARKETING_VERSION entries; assert every entry stays in sync instead of hardcoding four. Co-Authored-By: Claude Code Co-Authored-By: HAPI --- cli/scripts/release-version.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cli/scripts/release-version.test.ts b/cli/scripts/release-version.test.ts index 0a0eca1f..8962c132 100644 --- a/cli/scripts/release-version.test.ts +++ b/cli/scripts/release-version.test.ts @@ -52,9 +52,10 @@ describe('updateReleaseVersions', () => { expect(JSON.parse(read(paths.cli))).toEqual({ ...pkg, version: '1.2.3' }); expect(read(paths.shared)).toBe(shared.replace(/APP_VERSION = ['"][^'"]+['"]/, "APP_VERSION = '1.2.3'")); expect(read(paths.ios)).toBe(ios.replace(/MARKETING_VERSION = [^;]+;/g, 'MARKETING_VERSION = 1.2.3;')); - // Both app and extension, Debug and Release, must stay in sync. - expect([...read(paths.ios).matchAll(/MARKETING_VERSION = ([^;]+);/g)].map(match => match[1])) - .toEqual(['1.2.3', '1.2.3', '1.2.3', '1.2.3']); + // Both app and extension (plus Mac Catalyst configs) must stay in sync. + const iosVersions = [...read(paths.ios).matchAll(/MARKETING_VERSION = ([^;]+);/g)].map(match => match[1]); + expect(iosVersions.length).toBeGreaterThanOrEqual(4); + expect(iosVersions.every(version => version === '1.2.3')).toBe(true); expect(read(paths.android)).toBe(android.replace( /versionName = .*/, 'versionName = providers.gradleProperty("hapiVersionName").orElse("1.2.3").get()'