matcher with only db selection

This commit is contained in:
sbriat
2023-09-06 15:17:51 +02:00
parent e0030aba73
commit 98530af14a
13 changed files with 354 additions and 61 deletions

View File

@@ -1,6 +1,7 @@
import { RpcExceptionCode } from '@mobicoop/ddd-library';
import { AlgorithmType } from '@modules/ad/core/application/types/algorithm.types';
import { Frequency } from '@modules/ad/core/domain/ad.types';
import { MatchEntity } from '@modules/ad/core/domain/match.entity';
import { MatchRequestDto } from '@modules/ad/interface/grpc-controllers/dtos/match.request.dto';
import { WaypointDto } from '@modules/ad/interface/grpc-controllers/dtos/waypoint.dto';
import { MatchGrpcController } from '@modules/ad/interface/grpc-controllers/match.grpc-controller';
@@ -49,12 +50,12 @@ const mockQueryBus = {
execute: jest
.fn()
.mockImplementationOnce(() => [
{
adId: 1,
},
{
adId: 2,
},
MatchEntity.create({
adId: '0cc87f3b-7a27-4eff-9850-a5d642c2a0c3',
}),
MatchEntity.create({
adId: 'e4cc156f-aaa5-4270-bf6f-82f5a230d748',
}),
])
.mockImplementationOnce(() => {
throw new Error();