From 7d4469418bd46328e01faf33e936adfb71e02146 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 15 May 2023 20:06:43 +0800 Subject: [PATCH] reduce caching errors on test env (#612) Co-authored-by: neil molina --- modules/desktop/electron/libs/ipc.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/desktop/electron/libs/ipc.ts b/modules/desktop/electron/libs/ipc.ts index 3fdd6ab..56457aa 100644 --- a/modules/desktop/electron/libs/ipc.ts +++ b/modules/desktop/electron/libs/ipc.ts @@ -192,6 +192,7 @@ export default function initializeHandlers({ notifyMainWindow }: HandlerOptions) ipcMain.handle("cache-image", async (_event, url) => { try { + if (process.env.NODE_ENV === "test") return url; log.info("caching:", url); const cachedImagePath = await cacheImage(url); return cachedImagePath;