fix lists queries and authenticated list reading
This commit is contained in:
@@ -116,13 +116,19 @@ describe('TwitterClient lists owned', () => {
|
||||
await client.getOwnedLists(1);
|
||||
|
||||
const [url] = mockFetch.mock.calls[0];
|
||||
const parsedFeatures = JSON.parse(new URL(url as string).searchParams.get('features') as string);
|
||||
expect(parsedFeatures.responsive_web_graphql_exclude_directive_enabled).toBe(true);
|
||||
expect(parsedFeatures.blue_business_profile_image_shape_enabled).toBe(true);
|
||||
expect(parsedFeatures.responsive_web_text_conversations_enabled).toBe(false);
|
||||
expect(parsedFeatures.tweetypie_unmention_optimization_enabled).toBe(true);
|
||||
expect(parsedFeatures.vibe_api_enabled).toBe(true);
|
||||
expect(parsedFeatures.interactive_text_enabled).toBe(true);
|
||||
const requestUrl = new URL(url as string);
|
||||
const parsedVariables = JSON.parse(requestUrl.searchParams.get('variables') as string);
|
||||
const parsedFeatures = JSON.parse(requestUrl.searchParams.get('features') as string);
|
||||
expect(parsedVariables).toEqual({
|
||||
userId: '12345',
|
||||
isListMemberTargetUserId: '12345',
|
||||
count: 1,
|
||||
});
|
||||
expect(parsedFeatures.responsive_web_graphql_exclude_directive_enabled).toBeUndefined();
|
||||
expect(parsedFeatures.responsive_web_grok_annotations_enabled).toBe(true);
|
||||
expect(parsedFeatures.rweb_cashtags_enabled).toBe(true);
|
||||
expect(parsedFeatures.responsive_web_grok_show_grok_translated_post).toBe(true);
|
||||
expect(parsedFeatures.longform_notetweets_inline_media_enabled).toBe(false);
|
||||
});
|
||||
|
||||
it('handles private lists correctly', async () => {
|
||||
|
||||
Reference in New Issue
Block a user