rulemorph 0.3.1

YAML-based declarative data transformation engine for CSV/JSON to JSON
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[test]
fn test_eval_start_ref() {
    let ctx = V2EvalContext::new();
    let result = eval_v2_start(
        &V2Start::Ref(V2Ref::Input("name".to_string())),
        &json!({"name": "Bob"}),
        None,
        &json!({}),
        "test",
        &ctx,
    );
    assert!(matches!(result, Ok(EvalValue::Value(v)) if v == json!("Bob")));
}