mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add test cases for class
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { GetterRepository } from "../repositories/GetterRepository";
|
import { GetterRepository } from "../repositories/GetterRepository";
|
||||||
|
|
||||||
class NotificationService {
|
export class NotificationService {
|
||||||
constructor(private repository: GetterRepository) {}
|
constructor(private repository: GetterRepository) {}
|
||||||
|
|
||||||
public startListeningForNotification() {
|
public startListeningForNotification() {
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import { describe, it } from "@jest/globals";
|
||||||
|
|
||||||
|
describe("NotificationService", () => {
|
||||||
|
describe("startReloadingNotificationTokens", () => {
|
||||||
|
it("reloads keys when first called", async () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it("sets a timer to reload keys", async () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("startListeningForNotification", () => {
|
||||||
|
it("sends a notification to given shuttle/stop ID when changed", async () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it("clears the notification after delivering successfully", async () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("stopListeningForNotification", () => {
|
||||||
|
it("stops notification from sending to given shuttle/stop ID", async () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("stopListeningForAllNotifications", () => {
|
||||||
|
it("clears all notifications scheduled to be sent", async () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user