tessera-command 0.6.0

The tesserax command: opens a recipe, then serves, fetches or runs tasks
Documentation
use crate::surface::json;

#[test]
fn cli_json_current() {
    let want = format!("{:#}\n", json());
    let got = include_str!("included/frontend/cli/cli.json");
    let fix = "run `cargo run -p tessera-cli -- --cli-json > frontend/cli/cli.json`";
    assert!(got == want, "frontend/cli/cli.json is stale: {fix}");
}

#[test]
fn compact_surface() {
    let surface = json();
    let flags = surface["commands"]["compact-memory"]["flags"]
        .as_array()
        .unwrap();
    assert_eq!(flags.len(), 5);
    assert!(
        flags
            .iter()
            .any(|f| f["flag"] == "--headroom-mib" && f["takes"] == true)
    );
}