fix method calls and tests

This commit is contained in:
2025-03-27 10:56:57 -07:00
parent a665c29745
commit ef94a9aa7e
4 changed files with 17 additions and 16 deletions

View File

@@ -2,8 +2,8 @@ import { describe, expect, it } from "@jest/globals";
import { generateMockSystems } from "../testHelpers/mockDataGenerators";
import { setupTestServerContext, setupTestServerHolder } from "../testHelpers/apolloTestServerHelpers";
import assert = require("node:assert");
import { ScheduledNotification } from "../../src/notifications/schedulers/ETANotificationScheduler";
import { addMockShuttleToRepository, addMockStopToRepository } from "../testHelpers/repositorySetupHelpers";
import { ScheduledNotification } from "../../src/repositories/NotificationRepository";
// See Apollo documentation for integration test guide
// https://www.apollographql.com/docs/apollo-server/testing/testing
@@ -106,13 +106,13 @@ describe("QueryResolvers", () => {
const shuttle = await addMockShuttleToRepository(context.shuttleRepository, "1");
const stop = await addMockStopToRepository(context.shuttleRepository, "1")
const notification: NotificationSchedulingArguments = {
const notification: ScheduledNotification = {
shuttleId: shuttle.id,
stopId: stop.id,
deviceId: "1",
secondsThreshold: 240,
};
await context.notificationRepository.scheduleNotification(notification);
await context.notificationRepository.addOrUpdateNotification(notification);
const notificationLookup: any = {
...notification,