From 71ef83bf02ba4b10c4640ad1586758eb5564d5ce Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Tue, 24 May 2022 20:24:08 +0200 Subject: [PATCH] Fix tests --- apps/api/src/app/portfolio/current-rate.service.spec.ts | 7 ++++++- .../yahoo-finance/yahoo-finance.service.spec.ts | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/api/src/app/portfolio/current-rate.service.spec.ts b/apps/api/src/app/portfolio/current-rate.service.spec.ts index 653cdc7dc..2ef8ad5fa 100644 --- a/apps/api/src/app/portfolio/current-rate.service.spec.ts +++ b/apps/api/src/app/portfolio/current-rate.service.spec.ts @@ -74,7 +74,12 @@ describe('CurrentRateService', () => { beforeAll(async () => { dataProviderService = new DataProviderService(null, [], null); - exchangeRateDataService = new ExchangeRateDataService(null, null, null); + exchangeRateDataService = new ExchangeRateDataService( + null, + null, + null, + null + ); marketDataService = new MarketDataService(null); await exchangeRateDataService.initialize(); diff --git a/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.spec.ts b/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.spec.ts index 648eb6037..e18b6b583 100644 --- a/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.spec.ts +++ b/apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.spec.ts @@ -1,3 +1,4 @@ +import { ConfigurationService } from '@ghostfolio/api/services/configuration.service'; import { CryptocurrencyService } from '@ghostfolio/api/services/cryptocurrency/cryptocurrency.service'; import { YahooFinanceService } from './yahoo-finance.service'; @@ -25,13 +26,18 @@ jest.mock( ); describe('YahooFinanceService', () => { + let configurationService: ConfigurationService; let cryptocurrencyService: CryptocurrencyService; let yahooFinanceService: YahooFinanceService; beforeAll(async () => { + configurationService = new ConfigurationService(); cryptocurrencyService = new CryptocurrencyService(); - yahooFinanceService = new YahooFinanceService(cryptocurrencyService); + yahooFinanceService = new YahooFinanceService( + configurationService, + cryptocurrencyService + ); }); it('convertFromYahooFinanceSymbol', async () => {