mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
Test previously failing case for SHUTTLE_WILL_LEAVE_STOP
This commit is contained in:
@@ -804,6 +804,10 @@ describe.each(repositoryImplementations)('$name', (holder) => {
|
||||
// Simulate arrival at stop 1
|
||||
const arrivalTime = new Date("2024-01-15T10:30:00Z");
|
||||
await repository.addOrUpdateShuttle(shuttle, arrivalTime.getTime());
|
||||
|
||||
// Test that it actually emits the event correctly and not right after the shuttle arrives
|
||||
await repository.addOrUpdateShuttle(shuttle, arrivalTime.getTime());
|
||||
expect(listener).not.toHaveBeenCalled();
|
||||
|
||||
shuttle.coordinates = { latitude: 12.5, longitude: 22.5 }; // Not at any stop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user