Skip to content

Commit f737dee

Browse files
committed
test(android): read the install-timeout fixture from the helper manifest fixture
#2618 removed `installArgs` from `AndroidSnapshotHelperManifest` and updated the shared helper fixture, the packaging script and the parse test, but this file kept its own hand-written manifest literal with the field still in it, which is what `tsc` rejects on main today's tip: an excess property on a type that no longer declares it. A second copy of the manifest is also how that field survived this long. Both tests re-hash the manifest for the APK they write, so the identity fields carry no test intent; they now come from `ANDROID_SNAPSHOT_HELPER_FIXTURE_ARTIFACT` like every other helper test. The one case that still needs a manifest carrying `installArgs` is the parse path that ignores it, and that case spells the key out inline in `snapshot-helper.test.ts`.
1 parent 2cafab3 commit f737dee

1 file changed

Lines changed: 4 additions & 15 deletions

File tree

packages/platform-android/src/__tests__/snapshot-helper-install.test.ts

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,12 @@ import {
1111
} from '../snapshot-helper-install.ts';
1212
import type { AndroidAdbExecutor, AndroidAdbProvider } from '../adb-executor.ts';
1313
import type { AndroidAdbInstaller } from '../adb-transport.ts';
14-
import type { AndroidSnapshotHelperManifest } from '../snapshot-helper-types.ts';
14+
import { ANDROID_SNAPSHOT_HELPER_FIXTURE_ARTIFACT } from './test-utils/android-snapshot-helper.ts';
1515
import { mkdtempForTest } from './test-utils/tmp-dir.ts';
1616

17-
const manifest: AndroidSnapshotHelperManifest = {
18-
name: 'android-snapshot-helper',
19-
version: '0.13.3',
20-
apkUrl: null,
21-
sha256: 'a'.repeat(64),
22-
packageName: 'com.callstack.agentdevice.snapshothelper',
23-
versionCode: 13003,
24-
instrumentationRunner: 'com.callstack.agentdevice.snapshothelper/.SnapshotInstrumentation',
25-
minSdk: 23,
26-
targetSdk: 36,
27-
outputFormat: 'uiautomator-xml',
28-
statusProtocol: 'android-snapshot-helper-v1',
29-
installArgs: ['install', '-r'],
30-
};
17+
// Every test here re-hashes the manifest for the APK it writes, so the identity fields come from the
18+
// one helper fixture rather than a second copy that can drift from the manifest type.
19+
const manifest = ANDROID_SNAPSHOT_HELPER_FIXTURE_ARTIFACT.manifest;
3120

3221
beforeEach(() => {
3322
resetAndroidSnapshotHelperInstallCache();

0 commit comments

Comments
 (0)