mirror of
https://github.com/ultraworkers/claw-code.git
synced 2026-05-03 02:21:53 +08:00
test(output_format_contract): add plugins json coverage to inventory_commands test (#2972)
Add four assertions to inventory_commands_emit_structured_json_when_requested: - kind == "plugin" - action == "list" - reload_runtime is boolean - target is null when no plugin is targeted Closes the only major --output-format json surface with zero contract coverage. All other surfaces (agents, mcp, skills, status, sandbox, doctor, help, version, acp, bootstrap-plan, system-prompt, init, diff, config) already had test assertions.
This commit is contained in:
parent
57096b0a1a
commit
8e45f1850c
@ -105,6 +105,18 @@ fn inventory_commands_emit_structured_json_when_requested() {
|
|||||||
let skills = assert_json_command(&root, &["--output-format", "json", "skills"]);
|
let skills = assert_json_command(&root, &["--output-format", "json", "skills"]);
|
||||||
assert_eq!(skills["kind"], "skills");
|
assert_eq!(skills["kind"], "skills");
|
||||||
assert_eq!(skills["action"], "list");
|
assert_eq!(skills["action"], "list");
|
||||||
|
|
||||||
|
let plugins = assert_json_command(&root, &["--output-format", "json", "plugins"]);
|
||||||
|
assert_eq!(plugins["kind"], "plugin");
|
||||||
|
assert_eq!(plugins["action"], "list");
|
||||||
|
assert!(
|
||||||
|
plugins["reload_runtime"].is_boolean(),
|
||||||
|
"plugins reload_runtime should be a boolean"
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
plugins["target"].is_null(),
|
||||||
|
"plugins target should be null when no plugin is targeted"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user