mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
Test previously failing case for SHUTTLE_WILL_LEAVE_STOP
This commit is contained in:
@@ -805,6 +805,10 @@ describe.each(repositoryImplementations)('$name', (holder) => {
|
|||||||
const arrivalTime = new Date("2024-01-15T10:30:00Z");
|
const arrivalTime = new Date("2024-01-15T10:30:00Z");
|
||||||
await repository.addOrUpdateShuttle(shuttle, arrivalTime.getTime());
|
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
|
shuttle.coordinates = { latitude: 12.5, longitude: 22.5 }; // Not at any stop
|
||||||
|
|
||||||
// Simulate leaving stop 1
|
// Simulate leaving stop 1
|
||||||
|
|||||||
Reference in New Issue
Block a user