Skip to content

Commit 8e45f18

Browse files
authored
test(output_format_contract): add plugins json coverage to inventory_commands test (ultraworkers#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.
1 parent 57096b0 commit 8e45f18

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

rust/crates/rusty-claude-cli/tests/output_format_contract.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@ fn inventory_commands_emit_structured_json_when_requested() {
105105
let skills = assert_json_command(&root, &["--output-format", "json", "skills"]);
106106
assert_eq!(skills["kind"], "skills");
107107
assert_eq!(skills["action"], "list");
108+
109+
let plugins = assert_json_command(&root, &["--output-format", "json", "plugins"]);
110+
assert_eq!(plugins["kind"], "plugin");
111+
assert_eq!(plugins["action"], "list");
112+
assert!(
113+
plugins["reload_runtime"].is_boolean(),
114+
"plugins reload_runtime should be a boolean"
115+
);
116+
assert!(
117+
plugins["target"].is_null(),
118+
"plugins target should be null when no plugin is targeted"
119+
);
108120
}
109121

110122
#[test]

0 commit comments

Comments
 (0)