feat: introduce macro for testing snap files across platforms
This commit is contained in:
committed by
Charlie Marsh
parent
16d2ece87d
commit
413acdf83c
@@ -40,7 +40,7 @@ mod tests {
|
||||
|
||||
use crate::registry::Rule;
|
||||
use crate::linter::test_path;
|
||||
use crate::settings;
|
||||
use crate::{assert_yaml_snapshot, settings};
|
||||
|
||||
fn rules(rule_code: Rule, path: &Path) -> Result<()> {
|
||||
let snapshot = format!("{}_{}", rule_code.as_ref(), path.to_string_lossy());
|
||||
@@ -50,7 +50,7 @@ mod tests {
|
||||
.as_path(),
|
||||
&settings::Settings::for_rule(rule_code),
|
||||
)?;
|
||||
insta::assert_yaml_snapshot!(snapshot, diagnostics);
|
||||
assert_yaml_snapshot!(snapshot, diagnostics);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user