MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_file_event_serde

Function test_file_event_serde

crates/opencode-watcher/src/lib.rs:240–247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

238
239 #[test]
240 fn test_file_event_serde() {
241 let event = FileEvent::Add;
242 let json = serde_json::to_string(&event).unwrap();
243 assert_eq!(json, "\"add\"");
244
245 let parsed: FileEvent = serde_json::from_str(&json).unwrap();
246 assert_eq!(parsed, FileEvent::Add);
247 }
248
249 #[tokio::test]
250 async fn test_watch_directory() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected