Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
NghiaDTr committed Dec 11, 2024
1 parent 01d1683 commit bc3f2ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions processor/tests/routes/processor.route.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
createCustomPaymentType,
createCustomPaymentInterfaceInteractionType,
createCustomPaymentTransactionCancelReasonType,
createTransactionSurchargeCustomType,
createTransactionRefundForMolliePaymentCustomType,
} from '../../src/commercetools/customFields.commercetools';

jest.mock('../../src/commercetools/extensions.commercetools', () => ({
Expand All @@ -18,6 +20,8 @@ jest.mock('../../src/commercetools/customFields.commercetools', () => ({
createCustomPaymentType: jest.fn(),
createCustomPaymentInterfaceInteractionType: jest.fn(),
createCustomPaymentTransactionCancelReasonType: jest.fn(),
createTransactionSurchargeCustomType: jest.fn(),
createTransactionRefundForMolliePaymentCustomType: jest.fn(),
}));

describe('Test src/route/processor.route.ts', () => {
Expand Down Expand Up @@ -109,6 +113,8 @@ describe('Test src/route/processor.route.ts', () => {
(createCustomPaymentType as jest.Mock).mockReturnValueOnce(Promise.resolve());
(createCustomPaymentInterfaceInteractionType as jest.Mock).mockReturnValueOnce(Promise.resolve());
(createCustomPaymentTransactionCancelReasonType as jest.Mock).mockReturnValueOnce(Promise.resolve());
(createTransactionSurchargeCustomType as jest.Mock).mockReturnValueOnce(Promise.resolve());
(createTransactionRefundForMolliePaymentCustomType as jest.Mock).mockReturnValueOnce(Promise.resolve());

req = {
hostname: 'test.com',
Expand Down

0 comments on commit bc3f2ce

Please sign in to comment.