diff --git a/src/tests/icon-path.test.ts b/src/tests/icon-path.test.ts index 0eb475a..084be08 100644 --- a/src/tests/icon-path.test.ts +++ b/src/tests/icon-path.test.ts @@ -1,4 +1,5 @@ import assert from "node:assert/strict"; +import path from "node:path"; import test from "node:test"; import { AppRuntimeConfig } from "../main/config/runtime-config"; @@ -31,10 +32,11 @@ test("resolveAppIconPath prioriza iconPathOverride cuando existe", () => { test("resolveAppIconPath cae al primer icono por defecto existente", () => { const appConfig = getBaseConfig(); + const expectedIconPath = path.join("/app", "static", "icons", "icon.png"); - const iconPath = resolveAppIconPath(appConfig, "/app", (candidate) => candidate === "/app/static/icons/icon.png"); + const iconPath = resolveAppIconPath(appConfig, "/app", (candidate) => candidate === expectedIconPath); - assert.equal(iconPath, "/app/static/icons/icon.png"); + assert.equal(iconPath, expectedIconPath); }); test("resolveAppIconPath devuelve undefined cuando no hay iconos", () => { diff --git a/src/tests/process-manager.test.ts b/src/tests/process-manager.test.ts index 7e88a5b..013d802 100644 --- a/src/tests/process-manager.test.ts +++ b/src/tests/process-manager.test.ts @@ -78,6 +78,7 @@ test("waitForNodeCGReady resuelve cuando el endpoint responde 404", async () => appConfig: getBaseConfig(), log: () => undefined, deps: { + platform: "linux", pathExists: () => true, spawnProcess: () => child as unknown as import("node:child_process").ChildProcess, fetchUrl: async () => ({ ok: false, status: 404 }) as Response, @@ -110,6 +111,7 @@ test("stopNodeCG envĂ­a SIGTERM y luego SIGKILL si el proceso no sale", async () appConfig: getBaseConfig(), log: () => undefined, deps: { + platform: "linux", pathExists: () => true, spawnProcess: () => child as unknown as import("node:child_process").ChildProcess, fetchUrl: async () => ({ ok: false, status: 404 }) as Response,