TEST: Ensure app has a categories field
This commit is contained in:
parent
55fd0e4b7f
commit
b073e70f0d
1 changed files with 11 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue