Skip to content

Commit 8048028

Browse files
committed
test: take snapshots in multiple formats
1 parent c213563 commit 8048028

9 files changed

+4363
-1
lines changed

src/app/data.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ mod tests {
102102
glob!(PATH_PROJECT_ROOT, PATH_TEST_SAMPLES, |path| {
103103
let input = std::fs::read_to_string(path).unwrap();
104104
let data = Data::try_from(&input[..]).unwrap();
105-
insta_settings.bind(|| insta::assert_ron_snapshot!(data));
105+
let log_filename = path.file_name().unwrap().to_string_lossy().to_string();
106+
insta_settings
107+
.bind(|| insta::assert_ron_snapshot!(format!("{log_filename}_ron"), data));
108+
insta_settings
109+
.bind(|| insta::assert_yaml_snapshot!(format!("{log_filename}_yaml"), data));
110+
insta_settings
111+
.bind(|| insta::assert_debug_snapshot!(format!("{log_filename}_debug"), data));
106112
});
107113
}
108114

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)