mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
19 lines
660 B
TypeScript
19 lines
660 B
TypeScript
import test from "ava";
|
|
|
|
import { BundlePlatform, getBundlePlatform } from "./platform";
|
|
|
|
for (const [platform, arch, expected] of [
|
|
["linux", "x64", BundlePlatform.Linux64],
|
|
["linux", "arm64", BundlePlatform.LinuxArm64],
|
|
["linux", "ia32", BundlePlatform.Linux64],
|
|
["darwin", "x64", BundlePlatform.Osx64],
|
|
["darwin", "arm64", BundlePlatform.Osx64],
|
|
["win32", "x64", BundlePlatform.Win64],
|
|
["win32", "arm64", BundlePlatform.Win64],
|
|
["freebsd", "x64", undefined],
|
|
] as const) {
|
|
test(`getBundlePlatform maps ${platform}/${arch} to ${expected ?? "an all-platform bundle"}`, (t) => {
|
|
t.is(getBundlePlatform(platform, arch), expected);
|
|
});
|
|
}
|