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

Source from the content-addressed store, hash-verified

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