From f99a17bb6e218045894ffab55cb79ea44917f165 Mon Sep 17 00:00:00 2001 From: DS Boyce <260543580+ds-boyce@users.noreply.github.com> Date: Fri, 31 Jul 2026 10:01:14 -0700 Subject: [PATCH] Add additional tests for groupNotifications (#11332) --- .../notifications/__tests__/util.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/state/queries/notifications/__tests__/util.test.ts b/src/state/queries/notifications/__tests__/util.test.ts index d7bcb5e5d0..3122770a40 100644 --- a/src/state/queries/notifications/__tests__/util.test.ts +++ b/src/state/queries/notifications/__tests__/util.test.ts @@ -35,6 +35,23 @@ function makeFollowNotification( } describe('groupNotifications', () => { + it('does not group a starter pack follow with an organic follow', () => { + const pack = 'at://did:plc:alice/app.bsky.graph.starterpack/a' + + const grouped = groupNotifications([ + makeFollowNotification('did:plc:a'), + makeFollowNotification('did:plc:b', pack), + ]) + + expect(grouped).toHaveLength(2) + expect(grouped[0].notification.author.did).toBe('did:plc:a') + expect(grouped[0].notification.starterPack).toBeUndefined() + expect(grouped[0].additional).toBeUndefined() + expect(grouped[1].notification.author.did).toBe('did:plc:b') + expect(grouped[1].notification.starterPack?.uri).toBe(pack) + expect(grouped[1].additional).toBeUndefined() + }) + it('groups follows by starter pack', () => { const packA = 'at://did:plc:alice/app.bsky.graph.starterpack/a' const packB = 'at://did:plc:bob/app.bsky.graph.starterpack/b'