mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 07:52:41 +00:00
simpler route provider in ad module
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
GeorouterUnavailableException,
|
||||
RouteNotFoundException,
|
||||
} from '@modules/geography/core/domain/route.errors';
|
||||
import { Route } from '@modules/geography/core/domain/route.types';
|
||||
import { Route, Step } from '@modules/geography/core/domain/route.types';
|
||||
import {
|
||||
GEODESIC,
|
||||
PARAMS_PROVIDER,
|
||||
@@ -411,8 +411,8 @@ describe('Graphhopper Georouter', () => {
|
||||
},
|
||||
);
|
||||
expect(route.steps).toHaveLength(2);
|
||||
expect(route.steps[1].duration).toBe(1800);
|
||||
expect(route.steps[1].distance).toBeUndefined();
|
||||
expect((route.steps as Step[])[1].duration).toBe(1800);
|
||||
expect((route.steps as Step[])[1].distance).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should create one route with points and missed waypoints extrapolations', async () => {
|
||||
@@ -468,8 +468,8 @@ describe('Graphhopper Georouter', () => {
|
||||
points: true,
|
||||
},
|
||||
);
|
||||
expect(route.steps.length).toBe(3);
|
||||
expect(route.steps[1].duration).toBe(990);
|
||||
expect(route.steps[1].distance).toBe(25000);
|
||||
expect(route.steps).toHaveLength(3);
|
||||
expect((route.steps as Step[])[1].duration).toBe(990);
|
||||
expect((route.steps as Step[])[1].distance).toBe(25000);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user