Skip to content

Commit

Permalink
Update mex.token.charts.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
cfaur09 committed Sep 25, 2024
1 parent 64fc263 commit e7e2fe1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/unit/services/mex.token.charts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('MexTokenChartsService', () => {

jest.spyOn(graphQlService, 'getExchangeServiceData').mockResolvedValue(mockData);
jest.spyOn(mexTokenService, 'getMexTokenByIdentifier').mockResolvedValue(mockToken);
jest.spyOn(mexTokenChartsService as any, 'checkTokenExists').mockReturnValue(true);
jest.spyOn(mexTokenChartsService as any, 'isMexToken').mockReturnValue(true);

const result = await mexTokenChartsService.getTokenPricesHourResolutionRaw('TOKEN-123456');

Expand All @@ -71,7 +71,7 @@ describe('MexTokenChartsService', () => {

it('should return an empty array when no data is available', async () => {
jest.spyOn(graphQlService, 'getExchangeServiceData').mockResolvedValue({});
jest.spyOn(mexTokenChartsService as any, 'checkTokenExists').mockReturnValue(true);
jest.spyOn(mexTokenChartsService as any, 'isMexToken').mockReturnValue(true);

const result = await mexTokenChartsService.getTokenPricesHourResolutionRaw('TOKEN-123456');

Expand All @@ -92,7 +92,7 @@ describe('MexTokenChartsService', () => {

jest.spyOn(graphQlService, 'getExchangeServiceData').mockResolvedValue(mockData);
jest.spyOn(mexTokenService, 'getMexTokenByIdentifier').mockResolvedValue(mockToken);
jest.spyOn(mexTokenChartsService as any, 'checkTokenExists').mockReturnValue(true);
jest.spyOn(mexTokenChartsService as any, 'isMexToken').mockReturnValue(true);

const result = await mexTokenChartsService.getTokenPricesDayResolutionRaw('TOKEN-123456', '1683561648');

Expand All @@ -106,7 +106,7 @@ describe('MexTokenChartsService', () => {

it('should return an empty array when no data is available', async () => {
jest.spyOn(graphQlService, 'getExchangeServiceData').mockResolvedValue({});
jest.spyOn(mexTokenChartsService as any, 'checkTokenExists').mockReturnValue(true);
jest.spyOn(mexTokenChartsService as any, 'isMexToken').mockReturnValue(true);
const result = await mexTokenChartsService.getTokenPricesDayResolutionRaw('TOKEN-123456', '1683561648');

expect(result).toEqual([]);
Expand Down

0 comments on commit e7e2fe1

Please sign in to comment.