From 1394c424876a7c633636efca7f07af6354365ca2 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 03:45:11 +0000 Subject: [PATCH] refactor(ai): extract VideoModalController from js/app.js (agent) Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- tests/app-batch-fetch-profiles.test.mjs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/app-batch-fetch-profiles.test.mjs b/tests/app-batch-fetch-profiles.test.mjs index df90a4bc..d813bc47 100644 --- a/tests/app-batch-fetch-profiles.test.mjs +++ b/tests/app-batch-fetch-profiles.test.mjs @@ -52,12 +52,20 @@ test("batchFetchProfiles handles fast and failing relays", async () => { const originalWriteRelays = Array.isArray(nostrClient.writeRelays) ? [...nostrClient.writeRelays] : nostrClient.writeRelays; + // Make sure to backup readRelays too + const originalReadRelays = Array.isArray(nostrClient.readRelays) + ? [...nostrClient.readRelays] + : nostrClient.readRelays; + const originalPool = nostrClient.pool; const poolListCalls = []; nostrClient.relays = [FAST_RELAY, FAIL_RELAY]; nostrClient.writeRelays = [FAST_RELAY, FAIL_RELAY]; + // Mock readRelays to match relays, avoiding duplicate/extra queries if the implementation prioritizes them + nostrClient.readRelays = [FAST_RELAY, FAIL_RELAY]; + nostrClient.pool = { list: (relays, filters) => { poolListCalls.push({ relays, filters }); @@ -93,6 +101,7 @@ test("batchFetchProfiles handles fast and failing relays", async () => { } finally { nostrClient.relays = originalRelays; nostrClient.writeRelays = originalWriteRelays; + nostrClient.readRelays = originalReadRelays; nostrClient.pool = originalPool; }