Scope tests in cases

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-12 18:17:22 +01:00
parent 06816567ff
commit 9aeeb4eb5b

View file

@ -3,13 +3,14 @@ use std::path::Path;
use nomo::Context; use nomo::Context;
test_each_file::test_each_path! { for ["nomo"] in "./tests/cases/" as cases => check_for_input }
#[derive(serde::Serialize)] #[derive(serde::Serialize)]
struct Info { struct Info {
input: String, input: String,
context: HashMap<String, serde_json::Value>, context: HashMap<String, serde_json::Value>,
} }
test_each_file::test_each_path! { for ["nomo"] in "./tests/cases/" => check_for_input }
fn check_for_input([path]: [&Path; 1]) { fn check_for_input([path]: [&Path; 1]) {
let mut settings = insta::Settings::clone_current(); let mut settings = insta::Settings::clone_current();
settings.set_snapshot_path("cases"); settings.set_snapshot_path("cases");