mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-24 06:35:39 +00:00
Make Lua snapshot middleware test sort maps
This commit is contained in:
@@ -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);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user