PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: neet/masto.js (ts)
Issue: fetchNotifications should be paginated
Pull request description: Make fetchNotification paginatable
Closes #77 

Patch:
diff --git a/src/clients/masto/masto.ts b/src/clients/masto/masto.ts
index 21f2e2c9..723725d0 100644
--- a/src/clients/masto/masto.ts
+++ b/src/clients/masto/masto.ts
@@ -805,7 +805,7 @@ export class Masto extends Gateway {
    */
   @available({ since: '0.0.0' })
   public fetchNotifications(params?: FetchNotificationsParams) {
-    return this.get<Notification[]>('/api/v1/notifications', params);
+    return this.paginate<Notification[]>('/api/v1/notifications', params);
   }
 
   /**


Test patch:
diff --git a/src/clients/masto/__tests__/masto.spec.ts b/src/clients/masto/__tests__/masto.spec.ts
index a1baa755..fb81eccd 100644
--- a/src/clients/masto/__tests__/masto.spec.ts
+++ b/src/clients/masto/__tests__/masto.spec.ts
@@ -549,11 +549,11 @@ describe('Masto', () => {
   });
 
   test('fetchNotifications', async () => {
-    await masto.fetchNotifications({
+    masto.fetchNotifications({
       exclude_types: ['favourite', 'follow', 'mention', 'poll', 'reblog'],
     });
-    expect(mockGet).toBeCalledTimes(1);
-    expect(mockGet).toMatchSnapshot();
+    expect(mockPaginate).toBeCalledTimes(1);
+    expect(mockPaginate).toMatchSnapshot();
   });
 
   test('fetchNotification', async () => {