mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-29 17:02:28 +00:00
fix(test): fix app-batch-fetch-profiles and profile-modal-controller tests
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
8f7a69ee29
commit
4966efd5aa
2 files changed
+6
No files matched your search
@@ -49,6 +49,9 @@ test("batchFetchProfiles handles fast and failing relays", async () => {
|
||||
const originalRelays = Array.isArray(nostrClient.relays)
|
||||
? [...nostrClient.relays]
|
||||
: [];
|
||||
const originalReadRelays = Array.isArray(nostrClient.readRelays)
|
||||
? [...nostrClient.readRelays]
|
||||
: nostrClient.readRelays;
|
||||
const originalWriteRelays = Array.isArray(nostrClient.writeRelays)
|
||||
? [...nostrClient.writeRelays]
|
||||
: nostrClient.writeRelays;
|
||||
@@ -57,6 +60,7 @@ test("batchFetchProfiles handles fast and failing relays", async () => {
|
||||
const poolListCalls = [];
|
||||
|
||||
nostrClient.relays = [FAST_RELAY, FAIL_RELAY];
|
||||
nostrClient.readRelays = [FAST_RELAY, FAIL_RELAY];
|
||||
nostrClient.writeRelays = [FAST_RELAY, FAIL_RELAY];
|
||||
nostrClient.pool = {
|
||||
list: (relays, filters) => {
|
||||
@@ -92,6 +96,7 @@ test("batchFetchProfiles handles fast and failing relays", async () => {
|
||||
});
|
||||
} finally {
|
||||
nostrClient.relays = originalRelays;
|
||||
nostrClient.readRelays = originalReadRelays;
|
||||
nostrClient.writeRelays = originalWriteRelays;
|
||||
nostrClient.pool = originalPool;
|
||||
}
|
||||
|
||||
@@ -275,6 +275,7 @@ function createController(options = {}) {
|
||||
},
|
||||
publish: async () => ({ ok: true }),
|
||||
on: () => () => {},
|
||||
load: async () => {},
|
||||
};
|
||||
|
||||
const hashtagPreferences = {
|
||||
|
||||
Reference in new issue
Block a user