mirror of
https://github.com/Pandipipas/scoreko-electron-dev.git
synced 2026-06-06 05:32:06 +00:00
refactor(cleanup): completar fase 5 con renombrados semánticos
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user