@@ -1,6 +1,6 @@
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { TwitterClient } from '../src/lib/twitter-client.js';
|
||||
import { validCookies } from './twitter-client-fixtures.js';
|
||||
import { testRelayBaseUrl } from './twitter-client-fixtures.js';
|
||||
|
||||
const originalFetch = global.fetch;
|
||||
|
||||
@@ -84,7 +84,7 @@ describe('TwitterClient following/followers', () => {
|
||||
}),
|
||||
});
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies });
|
||||
const client = new TwitterClient({ relayBaseUrl: testRelayBaseUrl });
|
||||
const clientPrivate = client as unknown as TwitterClient & { getFollowingQueryIds: () => Promise<string[]> };
|
||||
clientPrivate.getFollowingQueryIds = async () => ['test'];
|
||||
|
||||
@@ -138,7 +138,7 @@ describe('TwitterClient following/followers', () => {
|
||||
}),
|
||||
});
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies });
|
||||
const client = new TwitterClient({ relayBaseUrl: testRelayBaseUrl });
|
||||
const clientPrivate = client as unknown as TwitterClient & { getFollowersQueryIds: () => Promise<string[]> };
|
||||
clientPrivate.getFollowersQueryIds = async () => ['test'];
|
||||
|
||||
@@ -183,7 +183,7 @@ describe('TwitterClient following/followers', () => {
|
||||
}),
|
||||
});
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies });
|
||||
const client = new TwitterClient({ relayBaseUrl: testRelayBaseUrl });
|
||||
const clientPrivate = client as unknown as TwitterClient & {
|
||||
getFollowingQueryIds: () => Promise<string[]>;
|
||||
refreshQueryIds: () => Promise<void>;
|
||||
@@ -225,7 +225,7 @@ describe('TwitterClient following/followers', () => {
|
||||
}),
|
||||
});
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies });
|
||||
const client = new TwitterClient({ relayBaseUrl: testRelayBaseUrl });
|
||||
const clientPrivate = client as unknown as TwitterClient & { getFollowingQueryIds: () => Promise<string[]> };
|
||||
clientPrivate.getFollowingQueryIds = async () => ['test'];
|
||||
|
||||
@@ -265,7 +265,7 @@ describe('TwitterClient following/followers', () => {
|
||||
}),
|
||||
});
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies });
|
||||
const client = new TwitterClient({ relayBaseUrl: testRelayBaseUrl });
|
||||
const clientPrivate = client as unknown as TwitterClient & { getFollowersQueryIds: () => Promise<string[]> };
|
||||
clientPrivate.getFollowersQueryIds = async () => ['test'];
|
||||
|
||||
@@ -320,7 +320,7 @@ describe('TwitterClient following/followers', () => {
|
||||
}),
|
||||
});
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies });
|
||||
const client = new TwitterClient({ relayBaseUrl: testRelayBaseUrl });
|
||||
const clientPrivate = client as unknown as TwitterClient & { getFollowersQueryIds: () => Promise<string[]> };
|
||||
clientPrivate.getFollowersQueryIds = async () => ['test'];
|
||||
|
||||
@@ -368,7 +368,7 @@ describe('TwitterClient following/followers', () => {
|
||||
}),
|
||||
});
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies });
|
||||
const client = new TwitterClient({ relayBaseUrl: testRelayBaseUrl });
|
||||
const clientPrivate = client as unknown as TwitterClient & { getFollowersQueryIds: () => Promise<string[]> };
|
||||
clientPrivate.getFollowersQueryIds = async () => ['test'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user