style: satisfy lint for quote depth
This commit is contained in:
@@ -992,9 +992,9 @@ describe('TwitterClient', () => {
|
||||
root.quoted_status_result = { result: quoted };
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies });
|
||||
const mapped = (client as unknown as { mapTweetResult: (result: unknown) => TweetData | undefined }).mapTweetResult(
|
||||
root,
|
||||
);
|
||||
const mapped = (
|
||||
client as unknown as { mapTweetResult: (result: unknown) => TweetData | undefined }
|
||||
).mapTweetResult(root);
|
||||
|
||||
expect(mapped?.quotedTweet?.id).toBe('2');
|
||||
expect(mapped?.quotedTweet?.quotedTweet).toBeUndefined();
|
||||
@@ -1006,9 +1006,9 @@ describe('TwitterClient', () => {
|
||||
root.quoted_status_result = { result: quoted };
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies, quoteDepth: 0 });
|
||||
const mapped = (client as unknown as { mapTweetResult: (result: unknown) => TweetData | undefined }).mapTweetResult(
|
||||
root,
|
||||
);
|
||||
const mapped = (
|
||||
client as unknown as { mapTweetResult: (result: unknown) => TweetData | undefined }
|
||||
).mapTweetResult(root);
|
||||
|
||||
expect(mapped?.quotedTweet).toBeUndefined();
|
||||
});
|
||||
@@ -1021,9 +1021,9 @@ describe('TwitterClient', () => {
|
||||
root.quoted_status_result = { result: quoted1 };
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies, quoteDepth: 2 });
|
||||
const mapped = (client as unknown as { mapTweetResult: (result: unknown) => TweetData | undefined }).mapTweetResult(
|
||||
root,
|
||||
);
|
||||
const mapped = (
|
||||
client as unknown as { mapTweetResult: (result: unknown) => TweetData | undefined }
|
||||
).mapTweetResult(root);
|
||||
|
||||
expect(mapped?.quotedTweet?.id).toBe('2');
|
||||
expect(mapped?.quotedTweet?.quotedTweet?.id).toBe('3');
|
||||
@@ -1041,9 +1041,9 @@ describe('TwitterClient', () => {
|
||||
};
|
||||
|
||||
const client = new TwitterClient({ cookies: validCookies });
|
||||
const mapped = (client as unknown as { mapTweetResult: (result: unknown) => TweetData | undefined }).mapTweetResult(
|
||||
root,
|
||||
);
|
||||
const mapped = (
|
||||
client as unknown as { mapTweetResult: (result: unknown) => TweetData | undefined }
|
||||
).mapTweetResult(root);
|
||||
|
||||
expect(mapped?.quotedTweet?.id).toBe('2');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user