|
|
|
@ -12,6 +12,7 @@ import { RedisCacheService } from '@ghostfolio/api/app/redis-cache/redis-cache.s |
|
|
|
import { RedisCacheServiceMock } from '@ghostfolio/api/app/redis-cache/redis-cache.service.mock'; |
|
|
|
import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; |
|
|
|
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; |
|
|
|
import { ExchangeRateDataServiceMock } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service.mock'; |
|
|
|
import { PortfolioSnapshotService } from '@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service'; |
|
|
|
import { PortfolioSnapshotServiceMock } from '@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service.mock'; |
|
|
|
import { parseDate } from '@ghostfolio/common/helper'; |
|
|
|
@ -23,18 +24,27 @@ import { join } from 'node:path'; |
|
|
|
|
|
|
|
jest.mock('@ghostfolio/api/app/portfolio/current-rate.service', () => { |
|
|
|
return { |
|
|
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
|
|
CurrentRateService: jest.fn().mockImplementation(() => { |
|
|
|
return CurrentRateServiceMock; |
|
|
|
}) |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
jest.mock( |
|
|
|
'@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service', |
|
|
|
() => { |
|
|
|
return { |
|
|
|
ExchangeRateDataService: jest.fn().mockImplementation(() => { |
|
|
|
return ExchangeRateDataServiceMock; |
|
|
|
}) |
|
|
|
}; |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
jest.mock( |
|
|
|
'@ghostfolio/api/services/queues/portfolio-snapshot/portfolio-snapshot.service', |
|
|
|
() => { |
|
|
|
return { |
|
|
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
|
|
PortfolioSnapshotService: jest.fn().mockImplementation(() => { |
|
|
|
return PortfolioSnapshotServiceMock; |
|
|
|
}) |
|
|
|
@ -44,7 +54,6 @@ jest.mock( |
|
|
|
|
|
|
|
jest.mock('@ghostfolio/api/app/redis-cache/redis-cache.service', () => { |
|
|
|
return { |
|
|
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
|
|
RedisCacheService: jest.fn().mockImplementation(() => { |
|
|
|
return RedisCacheServiceMock; |
|
|
|
}) |
|
|
|
|