mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
#22473 - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [X] Added/updated tests - [X] Manual QA for all new/changed functionality - For Orbit and Fleet Desktop changes: - [x] Manual QA must be performed in the three main OSs, macOS, Windows and Linux. --------- Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Co-authored-by: Ian Littman <iansltx@gmail.com>
23 lines
827 B
TypeScript
23 lines
827 B
TypeScript
import { getPlatformDisplayName } from "./fileUtils";
|
|
|
|
describe("fileUtils", () => {
|
|
describe("getPlatformDisplayName", () => {
|
|
const testCases = [
|
|
{ extension: "pkg", platform: "macOS" },
|
|
{ extension: "json", platform: "macOS" },
|
|
{ extension: "mobileconfig", platform: "macOS" },
|
|
{ extension: "exe", platform: "Windows" },
|
|
{ extension: "msi", platform: "Windows" },
|
|
{ extension: "xml", platform: "Windows" },
|
|
{ extension: "deb", platform: "Linux" },
|
|
{ extension: "rpm", platform: "Linux" },
|
|
];
|
|
|
|
testCases.forEach(({ extension, platform }) => {
|
|
it(`should return ${platform} for .${extension} files`, () => {
|
|
const file = new File([""], `test.${extension}`);
|
|
expect(getPlatformDisplayName(file)).toEqual(platform);
|
|
});
|
|
});
|
|
});
|
|
});
|