refactor: share Android and firmware provider factories (#826)

This commit is contained in:
N0zoM1z0
2026-10-07 11:20:26 +08:00
committed by GitHub
parent 764ff05231
commit 3ed59b2812
13 changed files with 228 additions and 27 deletions
@@ -11,6 +11,23 @@ import {
const it = test.skipIf(process.platform === "win32");
it("does not carry a factory instance's cleanup failure into another instance", async () => {
const failed = await setup("cleanup-failure");
const healthy = await setup();
const failure = await failed.service.execute("inspect_android_package", {
path: failed.apk,
});
expect(failure).toMatchObject({
ok: false,
error: { cleanupIncomplete: true },
});
const result = await healthy.service.execute("inspect_android_package", {
path: healthy.apk,
});
expect(result.ok).toBe(true);
await verifyCleanup(healthy.launches);
});
it("retains APK identity, original input, raw producer data and normalized observations", async () => {
const { service, apk, launches } = await setup();
const outcome = await service.execute("inspect_android_package", {