Files
reverse-engineering-anything/tests/boundary/cli/androidPackageViewCli.test.ts
T
gensokyo-devandHarsh 7e8f7f6101 feat(android): expose selected manifest component declarations (#7379)
Extend static manifest declarations and retain precise source locations and historical unknowns. Share bounded selected component views across CLI and MCP with complete parent Evidence.

Verified real ApiDemos, an AAPT2-built fixture, legacy Evidence, default-package metadata and relevant CLI/MCP contracts. Recorded whole-task token estimates, timing/resource limits and independent main-failure controls in the PR.

Co-authored-by: Harsh <johiyaharsh@gmail.com>
2026-10-27 12:37:10 +08:00

42 lines
1.1 KiB
TypeScript

import { expect } from "vitest";
import { cliTest } from "../../support/cli/cliFixture.js";
cliTest.for([
["complete", '{"kind":"android","facet":"components"}', "view"],
["summary", '{"kind":"android","facet":"components"}', "evidence_output"],
[
"summary",
'{"kind":"android","facet":"components","fields":["invented"]}',
"view",
],
["summary", "{broken", "view"],
] as const)(
"rejects invalid Android delivery before missing APK/JAR work (%s, %s)",
async ([detail, view, field], { cli }) => {
const result = await cli.run({
arguments: [
"inspect-android-package",
"/nonexistent/selected.apk",
"--detail",
detail,
"--view",
view,
"--json",
],
environment: {
REA_JADX_MCP_JAR: "/nonexistent/selected-engine.jar",
REA_LOG_LEVEL: "silent",
},
});
expect(result.exitCode).toBe(1);
expect(result.json).toMatchObject({
code: "invalid_request",
details: {
issues: expect.arrayContaining([
expect.objectContaining({ path: expect.arrayContaining([field]) }),
]),
},
});
},
);