mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add test for APNs bundle ID
This commit is contained in:
@@ -105,7 +105,18 @@ describe("AppleNotificationSender", () => {
|
||||
});
|
||||
|
||||
it('throws an error if the bundle ID is not set correctly', async () => {
|
||||
process.env = {
|
||||
...process.env,
|
||||
APNS_BUNDLE_ID: undefined,
|
||||
}
|
||||
const notificationArguments: NotificationAlertArguments = {
|
||||
title: 'Test notification',
|
||||
body: 'This notification will not send',
|
||||
}
|
||||
|
||||
await expect(async () => {
|
||||
await notificationSender.sendNotificationImmediately('1', notificationArguments);
|
||||
}).rejects.toThrow();
|
||||
});
|
||||
|
||||
it('returns false if there is an error sending the notification', async () => {
|
||||
|
||||
Reference in New Issue
Block a user