MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / test_load_json_file_valid

Function test_load_json_file_valid

tests/agent_suite/agent_test.rs:5353–5359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5351
5352#[test]
5353fn test_load_json_file_valid() {
5354 let dir = TempDir::new().unwrap();
5355 let path = dir.path().join("test.json");
5356 std::fs::write(&path, r#"{"key": "value"}"#).unwrap();
5357 let val = load_json_file(&path);
5358 assert_eq!(val["key"], "value");
5359}
5360
5361#[test]
5362fn test_load_json_file_invalid_returns_empty() {

Callers

nothing calls this directly

Calls 2

writeFunction · 0.85
load_json_fileFunction · 0.85

Tested by

no test coverage detected