refactor(cleanup): completar fase 5 con renombrados semánticos

This commit is contained in:
Pandipipas
2026-02-21 18:55:30 +01:00
parent 8047c99946
commit 710fea38c0
7 changed files with 114 additions and 113 deletions
+8 -8
View File
@@ -10,8 +10,8 @@ function getBaseConfig(): AppRuntimeConfig {
userModelId: "com.scoreko.desktop",
nodecgPort: "9090",
bundleName: "scoreko-dev",
dashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true",
loadingRoute: "dashboard/loading/main.html?standalone=true",
mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true",
loadingDashboardRoute: "dashboard/loading/main.html?standalone=true",
loadDelayMs: 10000,
startupTimeoutMs: 30000,
nodecgKillTimeoutMs: 2500,
@@ -19,28 +19,28 @@ function getBaseConfig(): AppRuntimeConfig {
}
test("resolveAppIconPath prioriza iconPathOverride cuando existe", () => {
const runtimeConfig: AppRuntimeConfig = {
const appConfig: AppRuntimeConfig = {
...getBaseConfig(),
iconPathOverride: "/custom/icon.ico",
};
const iconPath = resolveAppIconPath(runtimeConfig, "/app", (candidate) => candidate === "/custom/icon.ico");
const iconPath = resolveAppIconPath(appConfig, "/app", (candidate) => candidate === "/custom/icon.ico");
assert.equal(iconPath, "/custom/icon.ico");
});
test("resolveAppIconPath cae al primer icono por defecto existente", () => {
const runtimeConfig = getBaseConfig();
const appConfig = getBaseConfig();
const iconPath = resolveAppIconPath(runtimeConfig, "/app", (candidate) => candidate === "/app/static/icons/icon.png");
const iconPath = resolveAppIconPath(appConfig, "/app", (candidate) => candidate === "/app/static/icons/icon.png");
assert.equal(iconPath, "/app/static/icons/icon.png");
});
test("resolveAppIconPath devuelve undefined cuando no hay iconos", () => {
const runtimeConfig = getBaseConfig();
const appConfig = getBaseConfig();
const iconPath = resolveAppIconPath(runtimeConfig, "/app", () => false);
const iconPath = resolveAppIconPath(appConfig, "/app", () => false);
assert.equal(iconPath, undefined);
});