From ac02146346a43fa26cfb126ea5dcc97d9bfdb116 Mon Sep 17 00:00:00 2001 From: "burrito.space" Date: Thu, 23 Jul 2026 18:28:46 +0200 Subject: [PATCH] =?UTF-8?q?test:=20revive=20all=205=20remaining=20dead=20c?= =?UTF-8?q?hrome-api-polyfills=20unit=20tests=20(0=20deleted)=20=E2=80=94?= =?UTF-8?q?=20clear=20dead=20chrome-api-polyfills=20test=20dir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All five (alarms, storage-session, web-navigation, ipc-bridge, event-emitter) still matched current source exactly: their targets under apps/desktop/main/chrome-api-polyfills/ import cleanly under plain node (no top-level electron import) and all 62 assertions pass unmodified. So each was fixed (import path backend/electron/... -> main/...) and moved to top-level apps/desktop/tests/unit/ as chrome-polyfill-.test.js so the unit runner glob (tests/unit/*.test.js) actually executes them. The un-globbed tests/unit/chrome-api-polyfills/ directory is gone. Unit suite: 733 pass, 0 fail (was 671; +62 = the five revived suites). --- .../alarms.test.js => chrome-polyfill-alarms.test.js} | 2 +- ...nt-emitter.test.js => chrome-polyfill-event-emitter.test.js} | 2 +- .../ipc-bridge.test.js => chrome-polyfill-ipc-bridge.test.js} | 2 +- ...-session.test.js => chrome-polyfill-storage-session.test.js} | 2 +- ...avigation.test.js => chrome-polyfill-web-navigation.test.js} | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename apps/desktop/tests/unit/{chrome-api-polyfills/alarms.test.js => chrome-polyfill-alarms.test.js} (98%) rename apps/desktop/tests/unit/{chrome-api-polyfills/event-emitter.test.js => chrome-polyfill-event-emitter.test.js} (95%) rename apps/desktop/tests/unit/{chrome-api-polyfills/ipc-bridge.test.js => chrome-polyfill-ipc-bridge.test.js} (94%) rename apps/desktop/tests/unit/{chrome-api-polyfills/storage-session.test.js => chrome-polyfill-storage-session.test.js} (98%) rename apps/desktop/tests/unit/{chrome-api-polyfills/web-navigation.test.js => chrome-polyfill-web-navigation.test.js} (93%) diff --git a/apps/desktop/tests/unit/chrome-api-polyfills/alarms.test.js b/apps/desktop/tests/unit/chrome-polyfill-alarms.test.js similarity index 98% rename from apps/desktop/tests/unit/chrome-api-polyfills/alarms.test.js rename to apps/desktop/tests/unit/chrome-polyfill-alarms.test.js index 6a9a8a89..aa54767a 100644 --- a/apps/desktop/tests/unit/chrome-api-polyfills/alarms.test.js +++ b/apps/desktop/tests/unit/chrome-polyfill-alarms.test.js @@ -4,7 +4,7 @@ import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; const __dirname = dirname(fileURLToPath(import.meta.url)); -const modulePath = join(__dirname, '..', '..', '..', 'backend', 'electron', 'chrome-api-polyfills', 'alarms.js'); +const modulePath = join(__dirname, '..', '..', 'main', 'chrome-api-polyfills', 'alarms.js'); const { setupMainProcess, getPreloadScript } = await import(modulePath); diff --git a/apps/desktop/tests/unit/chrome-api-polyfills/event-emitter.test.js b/apps/desktop/tests/unit/chrome-polyfill-event-emitter.test.js similarity index 95% rename from apps/desktop/tests/unit/chrome-api-polyfills/event-emitter.test.js rename to apps/desktop/tests/unit/chrome-polyfill-event-emitter.test.js index 99044989..119ba7dd 100644 --- a/apps/desktop/tests/unit/chrome-api-polyfills/event-emitter.test.js +++ b/apps/desktop/tests/unit/chrome-polyfill-event-emitter.test.js @@ -4,7 +4,7 @@ import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; const __dirname = dirname(fileURLToPath(import.meta.url)); -const modulePath = join(__dirname, '..', '..', '..', 'backend', 'electron', 'chrome-api-polyfills', '_event-emitter.js'); +const modulePath = join(__dirname, '..', '..', 'main', 'chrome-api-polyfills', '_event-emitter.js'); const { createChromeEvent } = await import(modulePath); diff --git a/apps/desktop/tests/unit/chrome-api-polyfills/ipc-bridge.test.js b/apps/desktop/tests/unit/chrome-polyfill-ipc-bridge.test.js similarity index 94% rename from apps/desktop/tests/unit/chrome-api-polyfills/ipc-bridge.test.js rename to apps/desktop/tests/unit/chrome-polyfill-ipc-bridge.test.js index d9bd6618..7955a418 100644 --- a/apps/desktop/tests/unit/chrome-api-polyfills/ipc-bridge.test.js +++ b/apps/desktop/tests/unit/chrome-polyfill-ipc-bridge.test.js @@ -4,7 +4,7 @@ import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; const __dirname = dirname(fileURLToPath(import.meta.url)); -const modulePath = join(__dirname, '..', '..', '..', 'backend', 'electron', 'chrome-api-polyfills', '_ipc-bridge.js'); +const modulePath = join(__dirname, '..', '..', 'main', 'chrome-api-polyfills', '_ipc-bridge.js'); const { IPC_PREFIX, channel, registerHandler, removeHandler, invokeSnippet } = await import(modulePath); diff --git a/apps/desktop/tests/unit/chrome-api-polyfills/storage-session.test.js b/apps/desktop/tests/unit/chrome-polyfill-storage-session.test.js similarity index 98% rename from apps/desktop/tests/unit/chrome-api-polyfills/storage-session.test.js rename to apps/desktop/tests/unit/chrome-polyfill-storage-session.test.js index a87ea84c..08fc2e39 100644 --- a/apps/desktop/tests/unit/chrome-api-polyfills/storage-session.test.js +++ b/apps/desktop/tests/unit/chrome-polyfill-storage-session.test.js @@ -4,7 +4,7 @@ import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; const __dirname = dirname(fileURLToPath(import.meta.url)); -const modulePath = join(__dirname, '..', '..', '..', 'backend', 'electron', 'chrome-api-polyfills', 'storage-session.js'); +const modulePath = join(__dirname, '..', '..', 'main', 'chrome-api-polyfills', 'storage-session.js'); const { setupMainProcess, getPreloadScript } = await import(modulePath); diff --git a/apps/desktop/tests/unit/chrome-api-polyfills/web-navigation.test.js b/apps/desktop/tests/unit/chrome-polyfill-web-navigation.test.js similarity index 93% rename from apps/desktop/tests/unit/chrome-api-polyfills/web-navigation.test.js rename to apps/desktop/tests/unit/chrome-polyfill-web-navigation.test.js index bf18d452..9b544a61 100644 --- a/apps/desktop/tests/unit/chrome-api-polyfills/web-navigation.test.js +++ b/apps/desktop/tests/unit/chrome-polyfill-web-navigation.test.js @@ -4,7 +4,7 @@ import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; const __dirname = dirname(fileURLToPath(import.meta.url)); -const modulePath = join(__dirname, '..', '..', '..', 'backend', 'electron', 'chrome-api-polyfills', 'web-navigation.js'); +const modulePath = join(__dirname, '..', '..', 'main', 'chrome-api-polyfills', 'web-navigation.js'); const { getPreloadScript } = await import(modulePath); -- 2.51.2