From 0d407216bcc2eb7ba5f5e1280b993809c75b6c8b Mon Sep 17 00:00:00 2001 From: sbriat Date: Wed, 3 May 2023 10:57:27 +0200 Subject: [PATCH] add time converter to match module --- .../matcher/domain/entities/ecosystem/time.ts | 9 ++++++- src/modules/matcher/queries/match.query.ts | 1 + .../unit/domain/ecosystem/geography.spec.ts | 2 +- .../tests/unit/domain/ecosystem/time.spec.ts | 24 ++++++++++++++++++- .../engine/algorithm-factory-creator.spec.ts | 7 +++++- .../engine/algorithm-factory.abstract.spec.ts | 7 +++++- .../engine/classic-algorithm-factory.spec.ts | 7 +++++- .../classic-geo.filter.processor.spec.ts | 7 +++++- .../classic-time.filter.processor.spec.ts | 7 +++++- ...assic-waypoint.completer.processor.spec.ts | 7 +++++- .../domain/engine/classic.selector.spec.ts | 7 +++++- .../domain/engine/completer.abstract.spec.ts | 7 +++++- .../domain/engine/filter.abstract.spec.ts | 7 +++++- .../journey.completer.processor.spec.ts | 7 +++++- .../tests/unit/domain/engine/matcher.spec.ts | 7 +++++- .../domain/engine/processor.abstract.spec.ts | 7 +++++- .../engine/route.completer.processor.spec.ts | 7 +++++- .../domain/engine/selector.abstract.spec.ts | 7 +++++- .../tests/unit/domain/match.usecase.spec.ts | 8 ++++++- .../tests/unit/queries/match.query.spec.ts | 14 ++++++++++- 20 files changed, 137 insertions(+), 19 deletions(-) diff --git a/src/modules/matcher/domain/entities/ecosystem/time.ts b/src/modules/matcher/domain/entities/ecosystem/time.ts index d49df7b..83e3415 100644 --- a/src/modules/matcher/domain/entities/ecosystem/time.ts +++ b/src/modules/matcher/domain/entities/ecosystem/time.ts @@ -151,7 +151,14 @@ export class Time { private setSchedule = (): void => { Object.keys(this.timeRequest.schedule).map((day) => { - this.schedule[day] = this.timeRequest.schedule[day]; + this.schedule[day] = this.timeConverter.toUtcDate( + new Date( + `${this.fromDate.getFullYear()}-${this.fromDate.getMonth()}-${this.fromDate.getDate()} ${ + this.timeRequest.schedule[day] + }`, + ), + this.timeRequest.timezone, + ); }); }; diff --git a/src/modules/matcher/queries/match.query.ts b/src/modules/matcher/queries/match.query.ts index b8c09b5..8ac0388 100644 --- a/src/modules/matcher/queries/match.query.ts +++ b/src/modules/matcher/queries/match.query.ts @@ -93,6 +93,7 @@ export class MatchQuery { this.matchRequest, this.defaultParams.MARGIN_DURATION, this.defaultParams.VALIDITY_DURATION, + this.timeConverter, ); this.time.init(); }; diff --git a/src/modules/matcher/tests/unit/domain/ecosystem/geography.spec.ts b/src/modules/matcher/tests/unit/domain/ecosystem/geography.spec.ts index 1ca35d5..82925c7 100644 --- a/src/modules/matcher/tests/unit/domain/ecosystem/geography.spec.ts +++ b/src/modules/matcher/tests/unit/domain/ecosystem/geography.spec.ts @@ -66,7 +66,7 @@ const mockGeorouter = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), }; describe('Geography entity', () => { diff --git a/src/modules/matcher/tests/unit/domain/ecosystem/time.spec.ts b/src/modules/matcher/tests/unit/domain/ecosystem/time.spec.ts index fa5772e..1df151d 100644 --- a/src/modules/matcher/tests/unit/domain/ecosystem/time.spec.ts +++ b/src/modules/matcher/tests/unit/domain/ecosystem/time.spec.ts @@ -2,6 +2,9 @@ import { Time } from '../../../../domain/entities/ecosystem/time'; const MARGIN_DURATION = 900; const VALIDITY_DURATION = 365; +const mockTimeConverter = { + toUtcDate: jest.fn(), +}; describe('Time entity', () => { it('should be defined', () => { @@ -11,6 +14,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); expect(time).toBeDefined(); }); @@ -23,6 +27,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); time.init(); expect(time.fromDate.getFullYear()).toBe( @@ -37,6 +42,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); time.init(); expect(time.marginDurations['tue']).toBe(300); @@ -51,6 +57,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); time.init(); expect(time.marginDurations['tue']).toBe(900); @@ -67,6 +74,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); time.init(); expect(time.marginDurations['tue']).toBe(500); @@ -82,6 +90,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); time.init(); expect(time.fromDate.getFullYear()).toBe( @@ -89,7 +98,12 @@ describe('Time entity', () => { ); }); it('should throw an exception if no date is provided', () => { - const time = new Time({}, MARGIN_DURATION, VALIDITY_DURATION); + const time = new Time( + {}, + MARGIN_DURATION, + VALIDITY_DURATION, + mockTimeConverter, + ); expect(() => time.init()).toThrow(); }); it('should throw an exception if punctual date is invalid', () => { @@ -99,6 +113,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); expect(() => time.init()).toThrow(); }); @@ -109,6 +124,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); expect(() => time.init()).toThrow(); }); @@ -120,6 +136,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); expect(() => time.init()).toThrow(); }); @@ -131,6 +148,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); expect(() => time.init()).toThrow(); }); @@ -142,6 +160,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); expect(() => time.init()).toThrow(); }); @@ -154,6 +173,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); expect(() => time.init()).toThrow(); }); @@ -168,6 +188,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); expect(() => time.init()).toThrow(); }); @@ -180,6 +201,7 @@ describe('Time entity', () => { }, MARGIN_DURATION, VALIDITY_DURATION, + mockTimeConverter, ); expect(() => time.init()).toThrow(); }); diff --git a/src/modules/matcher/tests/unit/domain/engine/algorithm-factory-creator.spec.ts b/src/modules/matcher/tests/unit/domain/engine/algorithm-factory-creator.spec.ts index daa0dce..e9c076b 100644 --- a/src/modules/matcher/tests/unit/domain/engine/algorithm-factory-creator.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/algorithm-factory-creator.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); describe('AlgorithmFactoryCreator', () => { diff --git a/src/modules/matcher/tests/unit/domain/engine/algorithm-factory.abstract.spec.ts b/src/modules/matcher/tests/unit/domain/engine/algorithm-factory.abstract.spec.ts index 7b5d05f..f4b62c2 100644 --- a/src/modules/matcher/tests/unit/domain/engine/algorithm-factory.abstract.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/algorithm-factory.abstract.spec.ts @@ -12,7 +12,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -53,6 +57,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); class FakeSelector extends Selector { diff --git a/src/modules/matcher/tests/unit/domain/engine/classic-algorithm-factory.spec.ts b/src/modules/matcher/tests/unit/domain/engine/classic-algorithm-factory.spec.ts index 9d76d87..070b8ee 100644 --- a/src/modules/matcher/tests/unit/domain/engine/classic-algorithm-factory.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/classic-algorithm-factory.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); describe('ClassicAlgorithmFactory', () => { diff --git a/src/modules/matcher/tests/unit/domain/engine/classic-geo.filter.processor.spec.ts b/src/modules/matcher/tests/unit/domain/engine/classic-geo.filter.processor.spec.ts index 10ac6ad..a6272d6 100644 --- a/src/modules/matcher/tests/unit/domain/engine/classic-geo.filter.processor.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/classic-geo.filter.processor.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); describe('ClassicGeoFilter', () => { diff --git a/src/modules/matcher/tests/unit/domain/engine/classic-time.filter.processor.spec.ts b/src/modules/matcher/tests/unit/domain/engine/classic-time.filter.processor.spec.ts index 54791a5..825a186 100644 --- a/src/modules/matcher/tests/unit/domain/engine/classic-time.filter.processor.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/classic-time.filter.processor.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); describe('ClassicTimeFilter', () => { diff --git a/src/modules/matcher/tests/unit/domain/engine/classic-waypoint.completer.processor.spec.ts b/src/modules/matcher/tests/unit/domain/engine/classic-waypoint.completer.processor.spec.ts index 5b25396..961db3f 100644 --- a/src/modules/matcher/tests/unit/domain/engine/classic-waypoint.completer.processor.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/classic-waypoint.completer.processor.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); describe('ClassicWaypointCompleter', () => { diff --git a/src/modules/matcher/tests/unit/domain/engine/classic.selector.spec.ts b/src/modules/matcher/tests/unit/domain/engine/classic.selector.spec.ts index a15df9c..d20cd56 100644 --- a/src/modules/matcher/tests/unit/domain/engine/classic.selector.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/classic.selector.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); describe('ClassicSelector', () => { diff --git a/src/modules/matcher/tests/unit/domain/engine/completer.abstract.spec.ts b/src/modules/matcher/tests/unit/domain/engine/completer.abstract.spec.ts index 913b309..3dc02f4 100644 --- a/src/modules/matcher/tests/unit/domain/engine/completer.abstract.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/completer.abstract.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); class FakeCompleter extends Completer { diff --git a/src/modules/matcher/tests/unit/domain/engine/filter.abstract.spec.ts b/src/modules/matcher/tests/unit/domain/engine/filter.abstract.spec.ts index de67dc5..09fef45 100644 --- a/src/modules/matcher/tests/unit/domain/engine/filter.abstract.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/filter.abstract.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); class FakeFilter extends Filter { diff --git a/src/modules/matcher/tests/unit/domain/engine/journey.completer.processor.spec.ts b/src/modules/matcher/tests/unit/domain/engine/journey.completer.processor.spec.ts index f31b8e5..5f6c135 100644 --- a/src/modules/matcher/tests/unit/domain/engine/journey.completer.processor.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/journey.completer.processor.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); describe('JourneyCompleter', () => { diff --git a/src/modules/matcher/tests/unit/domain/engine/matcher.spec.ts b/src/modules/matcher/tests/unit/domain/engine/matcher.spec.ts index bb7446c..c4ce2fd 100644 --- a/src/modules/matcher/tests/unit/domain/engine/matcher.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/matcher.spec.ts @@ -22,7 +22,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -63,6 +67,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); describe('Matcher', () => { diff --git a/src/modules/matcher/tests/unit/domain/engine/processor.abstract.spec.ts b/src/modules/matcher/tests/unit/domain/engine/processor.abstract.spec.ts index 6665000..34948a6 100644 --- a/src/modules/matcher/tests/unit/domain/engine/processor.abstract.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/processor.abstract.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn().mockImplementation(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); class FakeProcessor extends Processor { diff --git a/src/modules/matcher/tests/unit/domain/engine/route.completer.processor.spec.ts b/src/modules/matcher/tests/unit/domain/engine/route.completer.processor.spec.ts index 311c42d..a1ac083 100644 --- a/src/modules/matcher/tests/unit/domain/engine/route.completer.processor.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/route.completer.processor.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); describe('RouteCompleter', () => { diff --git a/src/modules/matcher/tests/unit/domain/engine/selector.abstract.spec.ts b/src/modules/matcher/tests/unit/domain/engine/selector.abstract.spec.ts index 85302dc..a681135 100644 --- a/src/modules/matcher/tests/unit/domain/engine/selector.abstract.spec.ts +++ b/src/modules/matcher/tests/unit/domain/engine/selector.abstract.spec.ts @@ -10,7 +10,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -51,6 +55,7 @@ const matchQuery: MatchQuery = new MatchQuery( defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); class FakeSelector extends Selector { diff --git a/src/modules/matcher/tests/unit/domain/match.usecase.spec.ts b/src/modules/matcher/tests/unit/domain/match.usecase.spec.ts index d80dd1f..10d97aa 100644 --- a/src/modules/matcher/tests/unit/domain/match.usecase.spec.ts +++ b/src/modules/matcher/tests/unit/domain/match.usecase.spec.ts @@ -35,7 +35,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; const defaultParams: IDefaultParams = { @@ -106,6 +110,7 @@ describe('MatchUseCase', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ), ); expect(matches.total).toBe(3); @@ -119,6 +124,7 @@ describe('MatchUseCase', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ), ), ).rejects.toBeInstanceOf(MatcherException); diff --git a/src/modules/matcher/tests/unit/queries/match.query.spec.ts b/src/modules/matcher/tests/unit/queries/match.query.spec.ts index be1bfb5..bc14991 100644 --- a/src/modules/matcher/tests/unit/queries/match.query.spec.ts +++ b/src/modules/matcher/tests/unit/queries/match.query.spec.ts @@ -32,7 +32,11 @@ const mockGeorouterCreator = { }; const mockTimezoneFinder = { - timezones: jest.fn().mockImplementation(), + timezones: jest.fn().mockImplementation(() => ['Europe/Paris']), +}; + +const mockTimeConverter = { + toUtcDate: jest.fn(), }; describe('Match query', () => { @@ -54,6 +58,7 @@ describe('Match query', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); expect(matchQuery).toBeDefined(); expect(matchQuery.mode).toBe(Mode.MATCH); @@ -78,6 +83,7 @@ describe('Match query', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); expect(matchQuery.mode).toBe(Mode.PUBLISH_AND_MATCH); }); @@ -106,6 +112,7 @@ describe('Match query', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); expect(matchQuery.exclusions.length).toBe(4); }); @@ -129,6 +136,7 @@ describe('Match query', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); expect(matchQuery.roles).toEqual([Role.DRIVER]); }); @@ -152,6 +160,7 @@ describe('Match query', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); expect(matchQuery.roles).toEqual([Role.PASSENGER]); }); @@ -176,6 +185,7 @@ describe('Match query', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); expect(matchQuery.roles.length).toBe(2); expect(matchQuery.roles).toContain(Role.PASSENGER); @@ -202,6 +212,7 @@ describe('Match query', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); expect(matchQuery.requirement.seatsDriver).toBe(1); expect(matchQuery.requirement.seatsPassenger).toBe(2); @@ -234,6 +245,7 @@ describe('Match query', () => { defaultParams, mockGeorouterCreator, mockTimezoneFinder, + mockTimeConverter, ); expect(matchQuery.algorithmSettings.algorithmType).toBe( AlgorithmType.CLASSIC,