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 <noreply@anthropic.com>
Co-Authored-By: HAPI <noreply@hapi.run>
This commit is contained in:
2026-11-06 19:56:18 +08:00
co-authored by Claude Code HAPI
parent 7b08edb038
commit a61ab60796
+4 -3
View File
@@ -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()'