generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding functionality to check if all orgs are the same in foreman.toml
- Loading branch information
1 parent
ba2a1b9
commit 24435d6
Showing
5 changed files
with
549 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); |
Oops, something went wrong.