add GetTweetsAndReplies and FetchTweetsAndReplies

This commit is contained in:
Valentine 2024-10-01 00:10:08 +03:00
parent 0e07e464ba
commit ec5d5dc117
4 changed files with 36 additions and 0 deletions

View file

@ -452,3 +452,18 @@ func TestGetForYouTweets(t *testing.T) {
t.Errorf("Expected tweets count=%v, got: %v", maxTweetsNbr, count)
}
}
func TestGetTweetsAndReplies(t *testing.T) {
if skipAuthTest {
t.Skip("Skipping test due to environment variable")
}
tweets, _, err := testScraper.FetchTweetsAndRepliesByUserID("17874544", 20, "")
if err != nil {
t.Error(err)
}
if len(tweets) < 1 {
t.Errorf("Got %d tweets", len(tweets))
}
}