File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
apps/backend/src/donations Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,10 @@ import { Repository } from 'typeorm';
44import { Donation } from './donations.entity' ;
55import { DonationService } from './donations.service' ;
66import { mock } from 'jest-mock-extended' ;
7+ import { FoodManufacturer } from '../foodManufacturers/manufacturer.entity' ;
78
89const mockDonationRepository = mock < Repository < Donation > > ( ) ;
10+ const mockFoodManufacturerRepository = mock < Repository < FoodManufacturer > > ( ) ;
911
1012describe ( 'DonationService' , ( ) => {
1113 let service : DonationService ;
@@ -20,6 +22,10 @@ describe('DonationService', () => {
2022 provide : getRepositoryToken ( Donation ) ,
2123 useValue : mockDonationRepository ,
2224 } ,
25+ {
26+ provide : getRepositoryToken ( FoodManufacturer ) ,
27+ useValue : mockFoodManufacturerRepository ,
28+ } ,
2329 ] ,
2430 } ) . compile ( ) ;
2531
You can’t perform that action at this time.
0 commit comments