mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
add NotificationService method and test case stub
This commit is contained in:
@@ -250,4 +250,12 @@ export class NotificationService {
|
|||||||
}
|
}
|
||||||
return this.deviceIdsToDeliverTo[tuple.toString()].has(deviceId);
|
return this.deviceIdsToDeliverTo[tuple.toString()].has(deviceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all scheduled notification for the given device ID.
|
||||||
|
* @param deviceId
|
||||||
|
*/
|
||||||
|
public async getAllScheduledNotificationsForDevice(deviceId: string): Promise<ScheduledNotificationData[]> {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,4 +230,14 @@ describe("NotificationService", () => {
|
|||||||
expect(http2.connect as jest.Mock).toHaveBeenCalledTimes(0);
|
expect(http2.connect as jest.Mock).toHaveBeenCalledTimes(0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("getAllScheduledNotificationsForDevice", () => {
|
||||||
|
it("returns scheduled notifications for the device ID", async () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it("returns an empty array if there are no notifications", async () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user