test: clarify CLI and process diagnostics

This commit is contained in:
morluto committed 2026-11-08 00:25:43 +08:00
1 parent ee54b2e7cf
commit c928bb8d80
5 files changed
+18 -9

No files matched your search

+1 -1
View File
@@ -732,7 +732,7 @@ it("preserves cancellation while projecting observations and successful cleanup"
expect(projectAnalysisError(error)).toMatchObject({
code: "cancelled",
message: "Process capture was cancelled. Start it again when ready.",
message: expect.stringMatching(/process capture.*cancelled.*again/iu),
details: {
operation: "process_capture",
cleanup: "complete",
+4 -2
View File
@@ -97,8 +97,10 @@ exit 1
expect(
adbResultSchemas.capture_adb_screen.parse(output.normalized_result),
).toMatchObject({ width: 1, height: 1 });
expect(output.limitations).toContain(
"PNG signature, IHDR framing, checksum, and dimensions are validated; encoding and image contents are not validated",
expect(output.limitations).toContainEqual(
expect.stringMatching(
/PNG signature.*IHDR.*checksum.*dimensions.*validated.*encoding.*image contents.*not validated/iu,
),
);
expect(
(await readFile(join(outputPath, "screen.png"))).equals(frame),
+4 -2
View File
@@ -70,8 +70,10 @@ if (args.length === 1 && args[0] === 'version') {
serial: input.serial,
package_name: input.package,
});
expect(evidence.limitations).toContain(
"Uninstall explicitly requests user 0 without data retention (-k); device enforcement is not independently verified",
expect(evidence.limitations).toContainEqual(
expect.stringMatching(
/uninstall.*user 0.*without data retention.*-k.*device enforcement.*not independently verified/iu,
),
);
expect(response.isError).not.toBe(true);
expect(
@@ -107,8 +107,12 @@ workspaceCliTest.for([
operation: "cutter_command",
reason:
mode === "missing-watermark"
? "The bridge did not provide authenticated proof that earlier connections reached a terminal state."
: "The bridge status response did not contain a valid session identity.",
? expect.stringMatching(
/did not.*authenticated proof.*earlier connections.*terminal state/iu,
)
: expect.stringMatching(
/status.*did not contain.*valid session identity/iu,
),
diagnostics: { auxiliary_operation: "status" },
},
});
@@ -76,8 +76,9 @@ it.each(["fail", "record-and-continue"] as const)(
{
path: ["integrity_policy"],
reason: "invalid_value",
message:
"An integrity policy requires the static JavaScript ASAR/directory analysis lane; binary_overview accepts no input.",
message: expect.stringMatching(
/integrity policy.*static JavaScript ASAR\/directory.*binary_overview.*no input/iu,
),
},
],
},