add test for making a connection to the server

This commit is contained in:
2025-03-24 10:11:17 -07:00
parent e433662f19
commit ac65e23984

View File

@@ -93,13 +93,25 @@ describe("AppleNotificationSender", () => {
describe("sendNotificationImmediately", () => {
it('makes the connection to the http server if the notification should be sent', async () => {
const notificationArguments: NotificationAlertArguments = {
title: 'Test notification',
body: 'This notification will send',
}
const result = await notificationSender.sendNotificationImmediately('1', notificationArguments);
expect(http2.connect).toHaveBeenCalled();
expect(result).toBe(true);
});
it('throws an error if the bundle ID is not set correctly', async () => {
});
it('returns false if there is an error sending the notification', async () => {
});
it('does not send notification if shouldActuallySendNotifications is false', async () => {
notificationSender = new AppleNotificationSender(false);