add test for failing error code

This commit is contained in:
2025-03-24 10:14:43 -07:00
parent 20282c3cf9
commit 2ccdba3d11

View File

@@ -120,7 +120,17 @@ describe("AppleNotificationSender", () => {
}); });
it('returns false if there is an error sending the notification', async () => { it('returns false if there is an error sending the notification', async () => {
mockHttp2Connect(403);
const notificationArguments: NotificationAlertArguments = {
title: 'Test notification',
body: 'This notification will not send',
}
const result = await notificationSender.sendNotificationImmediately('1', notificationArguments);
expect(http2.connect).toHaveBeenCalled();
expect(result).toBe(false);
}); });
it('does not send notification if shouldActuallySendNotifications is false', async () => { it('does not send notification if shouldActuallySendNotifications is false', async () => {