rename methods for clarity on method events

This commit is contained in:
2025-02-02 13:14:45 -08:00
parent 9dd6e945c2
commit b30e4be895
3 changed files with 7 additions and 7 deletions

View File

@@ -228,7 +228,7 @@ describe("UnoptimizedInMemoryRepository", () => {
describe("subscribeToEtaChanges", () => {
test("notifies listeners if etas have been added or changed", async () => {
const mockCallback = jest.fn(); // Jest mock function to simulate a listener
repository.subscribeToEtaChanges(mockCallback);
repository.subscribeToEtaUpdates(mockCallback);
const mockEtas = generateMockEtas();
for (const eta of mockEtas) {
@@ -244,12 +244,12 @@ describe("UnoptimizedInMemoryRepository", () => {
describe("unsubscribeFromEtaChanges", () => {
test("stops notifying listeners after etas have stopped changing", async () => {
const mockCallback = jest.fn(); // Jest mock function to simulate a listener
repository.subscribeToEtaChanges(mockCallback);
repository.subscribeToEtaUpdates(mockCallback);
const mockEtas = generateMockEtas();
await repository.addOrUpdateEta(mockEtas[0]);
repository.unsubscribeFromEtaChanges(mockCallback);
repository.unsubscribeFromEtaUpdates(mockCallback);
await repository.addOrUpdateEta(mockEtas[mockEtas.length - 1]);