Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
NghiaDTr committed Nov 19, 2024
1 parent f85a9ac commit c15a623
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion processor/src/service/payment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export const handleCreatePayment = async (ctPayment: Payment): Promise<Controlle

const cart = await getCartFromPayment(ctPayment.id);

const [method, ] = ctPayment?.paymentMethodInfo?.method?.split(',') ?? [null, null];
const [method] = ctPayment?.paymentMethodInfo?.method?.split(',') ?? [null, null];

logger.debug(`SCTM - handleCreatePayment - Getting customized configuration for payment method: ${method}`);
const paymentMethodConfig = await getSingleMethodConfigObject(method as string);
Expand Down
2 changes: 0 additions & 2 deletions processor/tests/commercetools/action.commercetools.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ describe('Test actions.utils.ts', () => {
});

test('should be able to return the correct addCustomLineItem action', () => {
const customId = 'custom-id';

const name = {
de: MOLLIE_SURCHARGE_CUSTOM_LINE_ITEM,
en: MOLLIE_SURCHARGE_CUSTOM_LINE_ITEM,
Expand Down
19 changes: 0 additions & 19 deletions processor/tests/commercetools/customObjects.commercetools.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,6 @@ describe('Test getMethodConfigObjects', () => {
});

it('should throw error', async () => {
const mockWithContainer = jest.fn();
const mockGet = jest.fn();
const customObjects = [
{
id: '123',
name: '123',
},
{
id: 'test',
name: 'test',
},
] as unknown as CustomObject[];

const error = new Error('dummy error');

(createApiRoot as jest.Mock).mockReturnValue({
Expand Down Expand Up @@ -133,12 +120,6 @@ describe('Test getSingleMethodConfigObject', () => {
it('should throw error', async () => {
const key = 'test';

const customObject = {
id: '123',
key,
name: '123',
} as unknown as CustomObject[];

const mockError = new Error('dummy error');

(createApiRoot as jest.Mock).mockReturnValue({
Expand Down

0 comments on commit c15a623

Please sign in to comment.