fix: force fresh sweetistics thread fetch

This commit is contained in:
Peter Steinberger
2025-12-05 23:39:06 +01:00
parent c9d7646138
commit f2855643f3
2 changed files with 11 additions and 2 deletions
+4
View File
@@ -137,6 +137,8 @@ describe('SweetisticsClient', () => {
expect(result.tweets?.[0].id).toBe('2');
const [url, init] = fetchMock.mock.calls[0];
expect(url).toContain('/api/trpc/tweets.getConversation');
const params = new URL(url as string).searchParams.get('input');
expect(params).toBe(JSON.stringify({ tweetId: '1', force: 'true' }));
expect((init as RequestInit).headers).toMatchObject({ authorization: 'Bearer sweet-test' });
});
@@ -165,6 +167,8 @@ describe('SweetisticsClient', () => {
expect(result.tweets?.length).toBe(2);
const [url, init] = fetchMock.mock.calls[0];
expect(url).toContain('/api/trpc/tweets.getConversation');
const params = new URL(url as string).searchParams.get('input');
expect(params).toBe(JSON.stringify({ tweetId: '1', force: 'true' }));
expect((init as RequestInit).headers).toMatchObject({ authorization: 'Bearer sweet-test' });
});