style: satisfy formatting in tests

This commit is contained in:
Peter Steinberger
2026-01-01 11:32:41 +01:00
parent 578e38d427
commit f3977509dc
+23 -25
View File
@@ -1377,39 +1377,37 @@ describe('TwitterClient', () => {
}); });
it('refreshes query IDs after 404s', async () => { it('refreshes query IDs after 404s', async () => {
mockFetch mockFetch.mockResolvedValueOnce({ ok: false, status: 404, text: async () => 'nope' }).mockResolvedValueOnce({
.mockResolvedValueOnce({ ok: false, status: 404, text: async () => 'nope' }) ok: true,
.mockResolvedValueOnce({ status: 200,
ok: true, json: async () => ({
status: 200, data: {
json: async () => ({ user: {
data: { result: {
user: { timeline: {
result: {
timeline: { timeline: {
timeline: { instructions: [
instructions: [ {
{ entries: [
entries: [ {
{ content: {
content: { itemContent: {
itemContent: { user_results: {
user_results: { result: makeUserResult('1', 'alpha', 'Alpha'),
result: makeUserResult('1', 'alpha', 'Alpha'),
},
}, },
}, },
}, },
], },
}, ],
], },
}, ],
}, },
}, },
}, },
}, },
}), },
}); }),
});
const client = new TwitterClient({ cookies: validCookies }); const client = new TwitterClient({ cookies: validCookies });
const clientPrivate = client as unknown as TwitterClient & { const clientPrivate = client as unknown as TwitterClient & {