TEST: Ensure app has a categories field

This commit is contained in:
Nicolas Meienberger 2022-06-13 07:33:05 +00:00
parent 55fd0e4b7f
commit b073e70f0d

View file

@ -4,6 +4,7 @@ import jsyaml from "js-yaml";
interface AppConfig {
id: string;
port: number;
categories: string[];
requirements?: {
ports?: number[];
};
@ -17,7 +18,7 @@ interface AppConfig {
available: boolean;
}
const networkExceptions = ["pihole", "tailscale", "homeassistant"];
const networkExceptions = ["pihole", "tailscale", "homeassistant", "plex"];
const getAppConfigs = (): AppConfig[] => {
const apps: AppConfig[] = [];
@ -74,6 +75,15 @@ describe("App configs", () => {
});
});
it("Each app should have categories defined as an array", () => {
const apps = getAppConfigs();
apps.forEach((app) => {
expect(app.categories).toBeDefined();
expect(app.categories).toBeInstanceOf(Array);
});
});
it("Each app should have a name", () => {
const apps = getAppConfigs();