Skip to content

Commit

Permalink
MOL-401: update
Browse files Browse the repository at this point in the history
  • Loading branch information
tdang1-shopmacher committed Sep 9, 2024
1 parent 672c12f commit 5cb1be9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions processor/tests/mollie/profile.mollie.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe } from '@jest/globals';
import { describe, it, expect, beforeEach, afterEach, jest } from '@jest/globals';
import { getProfile } from '../../src/mollie/profile.mollie';
import { MollieApiError, Profile } from '@mollie/api-client';
import { initMollieClient } from '../../src/client/mollie.client';
Expand All @@ -20,7 +20,7 @@ describe('Test profile.mollie.ts', () => {

(initMollieClient as jest.Mock).mockReturnValue({
profiles: {
getCurrent: jest.fn().mockResolvedValue(mockProfile),
getCurrent: jest.fn().mockReturnValue(mockProfile),
},
});
});
Expand All @@ -39,7 +39,7 @@ describe('Test profile.mollie.ts', () => {
const errorMessage = `SCTM - getProfile - error: Missing authentication, or failed to authenticate, field: undefined"`;
(initMollieClient as jest.Mock).mockReturnValue({
profiles: {
getCurrent: jest.fn().mockRejectedValue(new MollieApiError(errorMessage)),
getCurrent: jest.fn().mockReturnValue(new MollieApiError(errorMessage)),
},
});

Expand All @@ -50,7 +50,7 @@ describe('Test profile.mollie.ts', () => {
const errorMessage = 'SCTM - getProfile - Failed to get Mollie profile with unknown errors';
(initMollieClient as jest.Mock).mockReturnValue({
profiles: {
getCurrent: jest.fn().mockRejectedValue(new Error(errorMessage)),
getCurrent: jest.fn().mockReturnValue(new Error(errorMessage)),
},
});

Expand Down

0 comments on commit 5cb1be9

Please sign in to comment.