From f62560da7f8905379e0175208e94f763b48d148c Mon Sep 17 00:00:00 2001 From: Nelson Taveras <4562733+nvtaveras@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:07:52 +0100 Subject: [PATCH] chore: fix tests --- test/exchange_adapters/base.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/exchange_adapters/base.test.ts b/test/exchange_adapters/base.test.ts index 67f8275..6e8377b 100644 --- a/test/exchange_adapters/base.test.ts +++ b/test/exchange_adapters/base.test.ts @@ -131,12 +131,12 @@ describe('BaseExchangeAdapter', () => { it('throws if the json cannot be parsed', async () => { // @ts-ignore - mockReturnValue is added by jest and is not in the fetch type signature fetch.mockReturnValue( - Promise.resolve(new Response('blah blah not json', { status: 200 })) + Promise.resolve(new Response('not json', { status: 200 })) ) await expect(async () => adapter.fetchFromApi(ExchangeDataType.TICKER, mockTickerEndpoint) ).rejects.toThrowError( - 'Failed to parse JSON response: FetchError: invalid json response body at reason: Unexpected token < in JSON at position 0' + 'Failed to parse JSON response: FetchError: invalid json response body at reason: Unexpected token \'o\', "not json"' ) expect(metricCollector.exchangeApiRequestError).toBeCalledWith( ...metricArgs,