Scope tests in cases
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
06816567ff
commit
9aeeb4eb5b
1 changed files with 2 additions and 1 deletions
|
|
@ -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");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue