From 079d4ce52d66bcfca8aedb172f325fff3ac83a17 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 17 Apr 2026 16:13:24 +0200 Subject: [PATCH] Add category discriminator to notification content fixtures The generated MessageNotificationContent schema now includes the category: "message" discriminator, so content literals in Partial overrides no longer narrow without it. --- client/src/stores/notificationsStore.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/stores/notificationsStore.test.ts b/client/src/stores/notificationsStore.test.ts index f7ff095b18a..ef568348f7b 100644 --- a/client/src/stores/notificationsStore.test.ts +++ b/client/src/stores/notificationsStore.test.ts @@ -34,7 +34,7 @@ function makeNotificationFixture(overrides: Partial = {}): Use expiration_time: null, seen_time: null, deleted: false, - content: { subject: "hello", message: "welcome" }, + content: { category: "message", subject: "hello", message: "welcome" }, ...overrides, } as UserNotification; } @@ -136,7 +136,7 @@ describe("notificationsStore — config-driven SSE vs polling", () => { const pushed = makeNotificationFixture({ id: "notif-2", - content: { subject: "pushed via sse", message: "hi" }, + content: { category: "message", subject: "pushed via sse", message: "hi" }, }); emitSse(sseState, "notification_update", pushed); await flushPromises();