mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Make Lua snapshot middleware test sort maps
This commit is contained in:
parent
f83abe15cb
commit
2957e8ad73
1 changed files with 4 additions and 2 deletions
|
|
@ -159,7 +159,7 @@ fn match_trailing<'a>(input: &'a str, trailer: &str) -> Option<&'a str> {
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use insta::assert_yaml_snapshot;
|
use insta::{assert_yaml_snapshot, with_settings};
|
||||||
|
|
||||||
use crate::imfs::{ImfsDebug, ImfsSnapshot, NoopFetcher};
|
use crate::imfs::{ImfsDebug, ImfsSnapshot, NoopFetcher};
|
||||||
|
|
||||||
|
|
@ -264,6 +264,8 @@ mod test {
|
||||||
let entry = imfs.get("/bar.server.lua").unwrap();
|
let entry = imfs.get("/bar.server.lua").unwrap();
|
||||||
let instance_snapshot = SnapshotLua::from_imfs(&mut imfs, &entry).unwrap().unwrap();
|
let instance_snapshot = SnapshotLua::from_imfs(&mut imfs, &entry).unwrap().unwrap();
|
||||||
|
|
||||||
assert_yaml_snapshot!(instance_snapshot);
|
with_settings!({ sort_maps => true }, {
|
||||||
|
assert_yaml_snapshot!(instance_snapshot);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue