mirror of
https://github.com/morluto/rea.git
synced 2026-10-31 03:45:39 +00:00
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>
42 lines
1.1 KiB
TypeScript
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]) }),
|
|
]),
|
|
},
|
|
});
|
|
},
|
|
);
|