diff --git a/server/tests/unit/nest/notification-transports.test.ts b/server/tests/unit/nest/notification-transports.test.ts index 6337811cd..1d1759a87 100644 --- a/server/tests/unit/nest/notification-transports.test.ts +++ b/server/tests/unit/nest/notification-transports.test.ts @@ -318,7 +318,8 @@ describe('built-in email manage link scope', () => { webhook: {} as never, ntfy: {} as never, push: {} as never, - }).find((channel) => channel.id === 'email')!; + }).find((channel) => channel.id === 'email'); + if (!emailChannel) throw new Error('Expected the built-in email channel to be registered'); await emailChannel.sendToUser(1, { event: 'version_available', title: 'Update', body: 'New version' }); await emailChannel.sendToUser(1, { event: 'trip_invite', title: 'Invite', body: 'Join trip' });