Skip to content

Commit

Permalink
Make tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
jackTabsCode committed Jul 30, 2024
1 parent 31029ec commit 1ba30d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/commands/sync/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ mod tests {
let lockfile = test_assets();

let ts = super::flat::generate_ts(&lockfile, "assets", "assets", false).unwrap();
assert_eq!(ts, "const assets = {\n\t\"/bar/baz.png\": \"rbxasset://.asphalt/bar/baz.png\";\n\t\"/foo.png\": \"rbxassetid://1\";\n};\nexport = assets;\n");
assert_eq!(ts, "const assets = {\n\t\"/bar/baz.png\": \"rbxasset://.asphalt/bar/baz.png\",\n\t\"/foo.png\": \"rbxassetid://1\",\n};\nexport = assets;\n");

let ts = super::flat::generate_ts(&lockfile, "assets", "assets", true).unwrap();
assert_eq!(ts, "const assets = {\n\t\"/bar/baz\": \"rbxasset://.asphalt/bar/baz.png\";\n\t\"/foo\": \"rbxassetid://1\";\n};\nexport = assets;\n");
assert_eq!(ts, "const assets = {\n\t\"/bar/baz\": \"rbxasset://.asphalt/bar/baz.png\",\n\t\"/foo\": \"rbxassetid://1\",\n};\nexport = assets;\n");
}

#[test]
Expand All @@ -104,13 +104,13 @@ mod tests {
let ts = super::nested::generate_ts(&lockfile, "assets", "assets", false).unwrap();
assert_eq!(
ts,
"const assets = {\n\tbar: {\n\t\t\"baz.png\": \"rbxasset://.asphalt/bar/baz.png\";\n\t};\n\t\"foo.png\": \"rbxassetid://1\";\n};\nexport = assets;\n"
"const assets = {\n\tbar: {\n\t\t\"baz.png\": \"rbxasset://.asphalt/bar/baz.png\",\n\t};\n\t\"foo.png\": \"rbxassetid://1\",\n};\nexport = assets;\n"
);

let ts = super::nested::generate_ts(&lockfile, "assets", "assets", true).unwrap();
assert_eq!(
ts,
"const assets = {\n\tbar: {\n\t\tbaz: \"rbxasset://.asphalt/bar/baz.png\";\n\t};\n\tfoo: \"rbxassetid://1\";\n};\nexport = assets;\n"
"const assets = {\n\tbar: {\n\t\tbaz: \"rbxasset://.asphalt/bar/baz.png\",\n\t};\n\tfoo: \"rbxassetid://1\",\n};\nexport = assets;\n"
);
}
}

0 comments on commit 1ba30d0

Please sign in to comment.