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

Function test_claude_code_parse_roundtrip

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

Source from the content-addressed store, hash-verified

200
201 #[test]
202 fn test_claude_code_parse_roundtrip() {
203 let registry = AgentRegistry::with_defaults();
204 let claude = registry.require("claude-code").unwrap();
205
206 let input = br#"{"session_id": "test-session", "transcript_path": "/tmp/t.jsonl"}"#;
207 let event = claude.parse_event(HookType::TurnEnd, input).unwrap();
208
209 assert_eq!(event.session_id, "test-session");
210 assert_eq!(event.event_type, HookType::TurnEnd);
211 }
212
213 #[test]
214 fn test_claude_code_parse_with_prompt() {

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
requireMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected