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:214–224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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