mirror of
https://github.com/morluto/rea.git
synced 2026-11-06 23:06:18 +00:00
test(cli): cover production doctor output option ordering (#6683)
* fix(cli): retain production doctor output routing * test(reference): return byte-preserving entry names * fix(javascript): coalesce projected source facts * test: repair isolation and format fixtures * fix(evidence): retain rebound snapshot proof Carry immutable member proof across caller and target path rebinding so low-headroom error projection reuses completed Evidence without cloning its payload. --------- Co-authored-by: eco-null <eco-null@users.noreply.github.com>
This commit is contained in:
1 parent
dc9f329764
commit
1d4e9f31c3
1 file changed
+39
@@ -5,6 +5,45 @@ import { workspaceCliTest } from "../../support/cli/workspaceCliFixture.js";
|
||||
const CLI_INTEGRATION_TIMEOUT_MS = 60_000;
|
||||
|
||||
describe("MCP doctor help boundary", () => {
|
||||
workspaceCliTest(
|
||||
"keeps output options from selecting the CLI-derived MCP doctor",
|
||||
async ({ cli }) => {
|
||||
for (const arguments_ of [
|
||||
["mcp", "doctor", "--json"],
|
||||
["--json", "mcp", "doctor"],
|
||||
["mcp", "--json", "doctor"],
|
||||
["--format", "json", "mcp", "doctor"],
|
||||
["mcp", "--format", "json", "doctor"],
|
||||
["--format=json", "mcp", "doctor"],
|
||||
["mcp", "--format=json", "doctor"],
|
||||
["--full-output", "mcp", "--json", "doctor"],
|
||||
]) {
|
||||
const result = await cli.run({
|
||||
arguments: arguments_,
|
||||
environment: { REA_MCP_DOCTOR_DEADLINE_MS: "0" },
|
||||
});
|
||||
expect(result.exitCode, arguments_.join(" ")).toBe(1);
|
||||
const report = {
|
||||
healthy: false,
|
||||
adapter: "production-stdio",
|
||||
checks: [
|
||||
expect.objectContaining({
|
||||
name: "REA_MCP_DOCTOR_DEADLINE_MS",
|
||||
ok: false,
|
||||
}),
|
||||
],
|
||||
};
|
||||
expect(result.json).toMatchObject(
|
||||
arguments_.includes("--full-output")
|
||||
? { ok: false, error: report }
|
||||
: report,
|
||||
);
|
||||
expect(result.stderr).toBe("");
|
||||
}
|
||||
},
|
||||
CLI_INTEGRATION_TIMEOUT_MS,
|
||||
);
|
||||
|
||||
workspaceCliTest(
|
||||
"answers the advertised help option instead of validating it",
|
||||
async ({ cli }) => {
|
||||
|
||||
Reference in new issue
Block a user