MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_claude_code_parse_with_prompt

Function test_claude_code_parse_with_prompt

atomic-agent/src/lib.rs:215–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213
214 #[test]
215 fn test_claude_code_parse_with_prompt() {
216 let registry = AgentRegistry::with_defaults();
217 let claude = registry.require("claude-code").unwrap();
218
219 let input = br#"{"session_id": "s1", "prompt": "Fix the bug in auth.rs"}"#;
220 let event = claude.parse_event(HookType::TurnStart, input).unwrap();
221
222 assert_eq!(event.session_id, "s1");
223 assert_eq!(event.event_type, HookType::TurnStart);
224 assert_eq!(event.prompt.as_deref(), Some("Fix the bug in auth.rs"));
225 }
226
227 #[test]
228 fn test_error_types_accessible() {

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
requireMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected