jb_space 0.2.0

Jetbrains Space API wrapper
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::fs;

use serde_json::Value;

pub fn load_fixture(fixture_name: &str) -> Value {
    let path = format!("tests/fixtures/{}", fixture_name);
    let content = fs::read_to_string(path)
        .unwrap_or_else(|_| panic!("Failed to read fixture: {}", fixture_name));
    serde_json::from_str(&content)
        .unwrap_or_else(|_| panic!("Failed to parse JSON fixture: {}", fixture_name))
}