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

Source from the content-addressed store, hash-verified

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