Skip to content

Commit

Permalink
adding functionality to check if all orgs are the same in foreman.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
afujiwara-roblox committed Sep 26, 2023
1 parent ba2a1b9 commit 24435d6
Show file tree
Hide file tree
Showing 5 changed files with 549 additions and 390 deletions.
28 changes: 28 additions & 0 deletions __tests__/hello.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
// who needs tests?
import configFile from "../src/configFile";
import { parse } from "toml";

test("get off my back, Jest", () => {
expect(5).toEqual(5);
});

test("checkSameOrgToolSpec same org", () => {
let config = `
[tools]\n
rojo = { source = "Roblox/Rojo-rbx-rojo", version = "6.2.0" }\n
selene = { source = "Roblox/Kampfkarren-selene", version = "0.18" }\n
stylua = { source = "Roblox/JohnnyMorganz-StyLua", version = "0.13" }\n
luau-analyze = { source = "Roblox/JohnnyMorganz-luau-analyze-rojo", version = "0.527" }\n
darklua = { gitlab = "Roblox/seaofvoices-darklua", version = "0.7.0" }\n
`;
let manifestContent = parse(config);
expect(configFile.checkSameOrgToolSpecs(manifestContent)).toEqual(true);
});

test("checkSameOrgToolSpec different org", () => {
let config = `
[tools]\n
rojo = { source = "Rojo-rbx/rojo", version = "6.2.0" }\n
selene = { source = "Roblox/Kampfkarren-selene", version = "0.18" }\n
stylua = { source = "Roblox/JohnnyMorganz-StyLua", version = "0.13" }\n
luau-analyze = { source = "Roblox/JohnnyMorganz-luau-analyze-rojo", version = "0.527" }\n
darklua = { gitlab = "Roblox/seaofvoices-darklua", version = "0.7.0" }\n
`;
let manifestContent = parse(config);
expect(configFile.checkSameOrgToolSpecs(manifestContent)).toEqual(false);
});
Loading

0 comments on commit 24435d6

Please sign in to comment.