From 2d525c20cbb69e2d1ad9b95c78ac2d00f890cfc8 Mon Sep 17 00:00:00 2001 From: Martin Zanoni Date: Thu, 13 Jun 2024 09:28:17 +0200 Subject: [PATCH] remove unused code --- full-sync/src/client/create.client.ts | 14 +------------- full-sync/tests/infrastructure/config.util.spec.ts | 1 - .../tests/infrastructure/relewise.clients.spec.ts | 3 --- full-sync/tests/routes/sync.routes.spec.ts | 3 +-- full-sync/tests/validators.spec.ts | 2 -- 5 files changed, 2 insertions(+), 21 deletions(-) diff --git a/full-sync/src/client/create.client.ts b/full-sync/src/client/create.client.ts index 6f8efc4..086800e 100644 --- a/full-sync/src/client/create.client.ts +++ b/full-sync/src/client/create.client.ts @@ -19,16 +19,4 @@ export const createApiRoot = ((root?: ByProjectKeyRequestBuilder) => () => { }); return root; -})(); - -// /** -// * Example code to get the Project details -// * This code has the same effect as sending a GET -// * request to the commercetools Composable Commerce API without any endpoints. -// * -// * @returns {Promise>} apiRoot -// */ -// Not used right now -// export const getProject = async () => { -// return await createApiRoot().get().execute(); -// }; +})(); \ No newline at end of file diff --git a/full-sync/tests/infrastructure/config.util.spec.ts b/full-sync/tests/infrastructure/config.util.spec.ts index dd37dc5..6e63a60 100644 --- a/full-sync/tests/infrastructure/config.util.spec.ts +++ b/full-sync/tests/infrastructure/config.util.spec.ts @@ -3,7 +3,6 @@ import { readConfiguration } from '../../src/infrastructure/utils/config.utils'; describe('readConfiguration', () => { it('should throw an error with missing config', () => { - const t = () => { readConfiguration(); }; diff --git a/full-sync/tests/infrastructure/relewise.clients.spec.ts b/full-sync/tests/infrastructure/relewise.clients.spec.ts index 9c129c8..3684575 100644 --- a/full-sync/tests/infrastructure/relewise.clients.spec.ts +++ b/full-sync/tests/infrastructure/relewise.clients.spec.ts @@ -1,8 +1,5 @@ import { createIntegrator } from '../../src/infrastructure/relewise.clients'; -//import * as configUtils from '../../src/infrastructure/utils/config.utils'; import { Integrator } from '@relewise/integrations'; -import { readConfiguration } from '../../src/infrastructure/utils/config.utils'; -import CustomError from '../../src/infrastructure/errors/custom.error'; jest.mock('../../src/infrastructure/utils/config.utils', () => ({ readConfiguration: jest.fn(() => ({ diff --git a/full-sync/tests/routes/sync.routes.spec.ts b/full-sync/tests/routes/sync.routes.spec.ts index f305c2c..3b200f2 100644 --- a/full-sync/tests/routes/sync.routes.spec.ts +++ b/full-sync/tests/routes/sync.routes.spec.ts @@ -1,8 +1,7 @@ // @ts-ignore import request from 'supertest'; import server from '../../src/index'; -import CustomError from '../../src/infrastructure/errors/custom.error'; -import { HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_SUCCESS_NO_CONTENT } from '../../src/infrastructure/constants/http.status'; +import { HTTP_STATUS_SUCCESS_NO_CONTENT } from '../../src/infrastructure/constants/http.status'; jest.mock('../../src/infrastructure/utils/config.utils', () => ({ readConfiguration: jest.fn(() => ({ diff --git a/full-sync/tests/validators.spec.ts b/full-sync/tests/validators.spec.ts index c91d66d..506a454 100644 --- a/full-sync/tests/validators.spec.ts +++ b/full-sync/tests/validators.spec.ts @@ -1,9 +1,7 @@ import envValidators from '../src/infrastructure/validators/env.validators'; import { - getValidateMessages, - } from '../src/infrastructure/validators/helpers.validators'; describe('Validators', () => {