From 53914a6621dfd4e076b3238ac32bd014475541d2 Mon Sep 17 00:00:00 2001 From: Bertrand Marron Date: Tue, 12 Nov 2024 11:46:57 +0100 Subject: [PATCH] chore: remove useless generated tests (#1358) --- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../aplus-content-api-2020-11-01/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../catalog-items-api-2020-12-01/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../catalog-items-api-2022-04-01/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/catalog-items-api-v0/jest.config.ts | 1 - clients/catalog-items-api-v0/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../data-kiosk-api-2023-11-15/jest.config.ts | 1 - .../data-kiosk-api-2023-11-15/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/easy-ship-2022-03-23/jest.config.ts | 1 - clients/easy-ship-2022-03-23/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/fba-inventory-api-v1/jest.config.ts | 1 - clients/fba-inventory-api-v1/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/feeds-api-2020-09-04/jest.config.ts | 1 - clients/feeds-api-2020-09-04/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/feeds-api-2021-06-30/jest.config.ts | 1 - clients/feeds-api-2021-06-30/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../finances-api-2024-06-19/jest.config.ts | 1 - clients/finances-api-2024-06-19/package.json | 3 +- .../finances-api-v0/__tests__/client.spec.ts | 39 ------------------ clients/finances-api-v0/jest.config.ts | 1 - clients/finances-api-v0/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../fulfillment-inbound-api-v0/jest.config.ts | 1 - .../fulfillment-inbound-api-v0/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../invoices-api-2024-06-19/jest.config.ts | 1 - clients/invoices-api-2024-06-19/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../merchant-fulfillment-api-v0/package.json | 3 +- .../messaging-api-v1/__tests__/client.spec.ts | 39 ------------------ clients/messaging-api-v1/jest.config.ts | 1 - clients/messaging-api-v1/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/notifications-api-v1/jest.config.ts | 1 - clients/notifications-api-v1/package.json | 3 +- .../orders-api-v0/__tests__/client.spec.ts | 39 ------------------ clients/orders-api-v0/jest.config.ts | 1 - clients/orders-api-v0/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/product-fees-api-v0/jest.config.ts | 1 - clients/product-fees-api-v0/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/product-pricing-api-v0/jest.config.ts | 1 - clients/product-pricing-api-v0/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../replenishment-api-2022-11-07/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/reports-api-2020-09-04/jest.config.ts | 1 - clients/reports-api-2020-09-04/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/reports-api-2021-06-30/jest.config.ts | 1 - clients/reports-api-2021-06-30/package.json | 3 +- clients/sales-api-v1/__tests__/client.spec.ts | 39 ------------------ clients/sales-api-v1/jest.config.ts | 1 - clients/sales-api-v1/package.json | 3 +- .../sellers-api-v1/__tests__/client.spec.ts | 39 ------------------ clients/sellers-api-v1/jest.config.ts | 1 - clients/sellers-api-v1/package.json | 3 +- .../services-api-v1/__tests__/client.spec.ts | 39 ------------------ clients/services-api-v1/jest.config.ts | 1 - clients/services-api-v1/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../shipment-invoicing-api-v0/jest.config.ts | 1 - .../shipment-invoicing-api-v0/package.json | 3 +- .../shipping-api-v1/__tests__/client.spec.ts | 39 ------------------ clients/shipping-api-v1/jest.config.ts | 1 - clients/shipping-api-v1/package.json | 3 +- .../shipping-api-v2/__tests__/client.spec.ts | 39 ------------------ clients/shipping-api-v2/jest.config.ts | 1 - clients/shipping-api-v2/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/solicitations-api-v1/jest.config.ts | 1 - clients/solicitations-api-v1/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/tokens-api-2021-03-01/jest.config.ts | 1 - clients/tokens-api-2021-03-01/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/uploads-api-2020-11-01/jest.config.ts | 1 - clients/uploads-api-2020-11-01/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/vendor-invoices-api-v1/jest.config.ts | 1 - clients/vendor-invoices-api-v1/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ clients/vendor-orders-api-v1/jest.config.ts | 1 - clients/vendor-orders-api-v1/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../vendor-shipments-api-v1/jest.config.ts | 1 - clients/vendor-shipments-api-v1/package.json | 3 +- .../__tests__/client.spec.ts | 39 ------------------ .../jest.config.ts | 1 - .../package.json | 3 +- codegen/generate-clients.ts | 9 ---- .../__tests__/client.spec.ts.mustache | 41 ------------------- codegen/templates/jest.config.ts.mustache | 1 - codegen/templates/package.json.mustache | 3 +- jest.config.ts | 1 - 173 files changed, 57 insertions(+), 2406 deletions(-) delete mode 100644 clients/amazon-warehousing-and-distribution-2024-05-09/__tests__/client.spec.ts delete mode 100644 clients/amazon-warehousing-and-distribution-2024-05-09/jest.config.ts delete mode 100644 clients/aplus-content-api-2020-11-01/__tests__/client.spec.ts delete mode 100644 clients/aplus-content-api-2020-11-01/jest.config.ts delete mode 100644 clients/application-integrations-api-2024-04-01/__tests__/client.spec.ts delete mode 100644 clients/application-integrations-api-2024-04-01/jest.config.ts delete mode 100644 clients/application-management-api-2023-11-30/__tests__/client.spec.ts delete mode 100644 clients/application-management-api-2023-11-30/jest.config.ts delete mode 100644 clients/catalog-items-api-2020-12-01/__tests__/client.spec.ts delete mode 100644 clients/catalog-items-api-2020-12-01/jest.config.ts delete mode 100644 clients/catalog-items-api-2022-04-01/__tests__/client.spec.ts delete mode 100644 clients/catalog-items-api-2022-04-01/jest.config.ts delete mode 100644 clients/catalog-items-api-v0/__tests__/client.spec.ts delete mode 100644 clients/catalog-items-api-v0/jest.config.ts delete mode 100644 clients/data-kiosk-api-2023-11-15/__tests__/client.spec.ts delete mode 100644 clients/data-kiosk-api-2023-11-15/jest.config.ts delete mode 100644 clients/easy-ship-2022-03-23/__tests__/client.spec.ts delete mode 100644 clients/easy-ship-2022-03-23/jest.config.ts delete mode 100644 clients/fba-inbound-eligibility-api-v1/__tests__/client.spec.ts delete mode 100644 clients/fba-inbound-eligibility-api-v1/jest.config.ts delete mode 100644 clients/fba-inventory-api-v1/__tests__/client.spec.ts delete mode 100644 clients/fba-inventory-api-v1/jest.config.ts delete mode 100644 clients/feeds-api-2020-09-04/__tests__/client.spec.ts delete mode 100644 clients/feeds-api-2020-09-04/jest.config.ts delete mode 100644 clients/feeds-api-2021-06-30/__tests__/client.spec.ts delete mode 100644 clients/feeds-api-2021-06-30/jest.config.ts delete mode 100644 clients/finances-api-2024-06-19/__tests__/client.spec.ts delete mode 100644 clients/finances-api-2024-06-19/jest.config.ts delete mode 100644 clients/finances-api-v0/__tests__/client.spec.ts delete mode 100644 clients/finances-api-v0/jest.config.ts delete mode 100644 clients/fulfillment-inbound-api-2024-03-20/__tests__/client.spec.ts delete mode 100644 clients/fulfillment-inbound-api-2024-03-20/jest.config.ts delete mode 100644 clients/fulfillment-inbound-api-v0/__tests__/client.spec.ts delete mode 100644 clients/fulfillment-inbound-api-v0/jest.config.ts delete mode 100644 clients/fulfillment-outbound-api-2020-07-01/__tests__/client.spec.ts delete mode 100644 clients/fulfillment-outbound-api-2020-07-01/jest.config.ts delete mode 100644 clients/invoices-api-2024-06-19/__tests__/client.spec.ts delete mode 100644 clients/invoices-api-2024-06-19/jest.config.ts delete mode 100644 clients/listings-items-api-2020-09-01/__tests__/client.spec.ts delete mode 100644 clients/listings-items-api-2020-09-01/jest.config.ts delete mode 100644 clients/listings-items-api-2021-08-01/__tests__/client.spec.ts delete mode 100644 clients/listings-items-api-2021-08-01/jest.config.ts delete mode 100644 clients/listings-restrictions-api-2021-08-01/__tests__/client.spec.ts delete mode 100644 clients/listings-restrictions-api-2021-08-01/jest.config.ts delete mode 100644 clients/merchant-fulfillment-api-v0/__tests__/client.spec.ts delete mode 100644 clients/merchant-fulfillment-api-v0/jest.config.ts delete mode 100644 clients/messaging-api-v1/__tests__/client.spec.ts delete mode 100644 clients/messaging-api-v1/jest.config.ts delete mode 100644 clients/notifications-api-v1/__tests__/client.spec.ts delete mode 100644 clients/notifications-api-v1/jest.config.ts delete mode 100644 clients/orders-api-v0/__tests__/client.spec.ts delete mode 100644 clients/orders-api-v0/jest.config.ts delete mode 100644 clients/product-fees-api-v0/__tests__/client.spec.ts delete mode 100644 clients/product-fees-api-v0/jest.config.ts delete mode 100644 clients/product-pricing-api-2022-05-01/__tests__/client.spec.ts delete mode 100644 clients/product-pricing-api-2022-05-01/jest.config.ts delete mode 100644 clients/product-pricing-api-v0/__tests__/client.spec.ts delete mode 100644 clients/product-pricing-api-v0/jest.config.ts delete mode 100644 clients/product-type-definitions-api-2020-09-01/__tests__/client.spec.ts delete mode 100644 clients/product-type-definitions-api-2020-09-01/jest.config.ts delete mode 100644 clients/replenishment-api-2022-11-07/__tests__/client.spec.ts delete mode 100644 clients/replenishment-api-2022-11-07/jest.config.ts delete mode 100644 clients/reports-api-2020-09-04/__tests__/client.spec.ts delete mode 100644 clients/reports-api-2020-09-04/jest.config.ts delete mode 100644 clients/reports-api-2021-06-30/__tests__/client.spec.ts delete mode 100644 clients/reports-api-2021-06-30/jest.config.ts delete mode 100644 clients/sales-api-v1/__tests__/client.spec.ts delete mode 100644 clients/sales-api-v1/jest.config.ts delete mode 100644 clients/sellers-api-v1/__tests__/client.spec.ts delete mode 100644 clients/sellers-api-v1/jest.config.ts delete mode 100644 clients/services-api-v1/__tests__/client.spec.ts delete mode 100644 clients/services-api-v1/jest.config.ts delete mode 100644 clients/shipment-invoicing-api-v0/__tests__/client.spec.ts delete mode 100644 clients/shipment-invoicing-api-v0/jest.config.ts delete mode 100644 clients/shipping-api-v1/__tests__/client.spec.ts delete mode 100644 clients/shipping-api-v1/jest.config.ts delete mode 100644 clients/shipping-api-v2/__tests__/client.spec.ts delete mode 100644 clients/shipping-api-v2/jest.config.ts delete mode 100644 clients/solicitations-api-v1/__tests__/client.spec.ts delete mode 100644 clients/solicitations-api-v1/jest.config.ts delete mode 100644 clients/supply-sources-api-2020-07-01/__tests__/client.spec.ts delete mode 100644 clients/supply-sources-api-2020-07-01/jest.config.ts delete mode 100644 clients/tokens-api-2021-03-01/__tests__/client.spec.ts delete mode 100644 clients/tokens-api-2021-03-01/jest.config.ts delete mode 100644 clients/uploads-api-2020-11-01/__tests__/client.spec.ts delete mode 100644 clients/uploads-api-2020-11-01/jest.config.ts delete mode 100644 clients/vendor-direct-fulfillment-inventory-api-v1/__tests__/client.spec.ts delete mode 100644 clients/vendor-direct-fulfillment-inventory-api-v1/jest.config.ts delete mode 100644 clients/vendor-direct-fulfillment-orders-api-2021-12-28/__tests__/client.spec.ts delete mode 100644 clients/vendor-direct-fulfillment-orders-api-2021-12-28/jest.config.ts delete mode 100644 clients/vendor-direct-fulfillment-orders-api-v1/__tests__/client.spec.ts delete mode 100644 clients/vendor-direct-fulfillment-orders-api-v1/jest.config.ts delete mode 100644 clients/vendor-direct-fulfillment-payments-api-v1/__tests__/client.spec.ts delete mode 100644 clients/vendor-direct-fulfillment-payments-api-v1/jest.config.ts delete mode 100644 clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/__tests__/client.spec.ts delete mode 100644 clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/jest.config.ts delete mode 100644 clients/vendor-direct-fulfillment-shipping-api-2021-12-28/__tests__/client.spec.ts delete mode 100644 clients/vendor-direct-fulfillment-shipping-api-2021-12-28/jest.config.ts delete mode 100644 clients/vendor-direct-fulfillment-shipping-api-v1/__tests__/client.spec.ts delete mode 100644 clients/vendor-direct-fulfillment-shipping-api-v1/jest.config.ts delete mode 100644 clients/vendor-direct-fulfillment-transactions-api-2021-12-28/__tests__/client.spec.ts delete mode 100644 clients/vendor-direct-fulfillment-transactions-api-2021-12-28/jest.config.ts delete mode 100644 clients/vendor-direct-fulfillment-transactions-api-v1/__tests__/client.spec.ts delete mode 100644 clients/vendor-direct-fulfillment-transactions-api-v1/jest.config.ts delete mode 100644 clients/vendor-invoices-api-v1/__tests__/client.spec.ts delete mode 100644 clients/vendor-invoices-api-v1/jest.config.ts delete mode 100644 clients/vendor-orders-api-v1/__tests__/client.spec.ts delete mode 100644 clients/vendor-orders-api-v1/jest.config.ts delete mode 100644 clients/vendor-shipments-api-v1/__tests__/client.spec.ts delete mode 100644 clients/vendor-shipments-api-v1/jest.config.ts delete mode 100644 clients/vendor-transaction-status-api-v1/__tests__/client.spec.ts delete mode 100644 clients/vendor-transaction-status-api-v1/jest.config.ts delete mode 100644 codegen/templates/__tests__/client.spec.ts.mustache delete mode 100644 codegen/templates/jest.config.ts.mustache diff --git a/clients/amazon-warehousing-and-distribution-2024-05-09/__tests__/client.spec.ts b/clients/amazon-warehousing-and-distribution-2024-05-09/__tests__/client.spec.ts deleted file mode 100644 index 1a6031e4d8..0000000000 --- a/clients/amazon-warehousing-and-distribution-2024-05-09/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {AmazonWarehousingAndDistributionClient, clientRateLimits} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new AmazonWarehousingAndDistributionClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(AmazonWarehousingAndDistributionClient) - }) -}) diff --git a/clients/amazon-warehousing-and-distribution-2024-05-09/jest.config.ts b/clients/amazon-warehousing-and-distribution-2024-05-09/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/amazon-warehousing-and-distribution-2024-05-09/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/amazon-warehousing-and-distribution-2024-05-09/package.json b/clients/amazon-warehousing-and-distribution-2024-05-09/package.json index b1ad53c835..24e5cf0ea4 100644 --- a/clients/amazon-warehousing-and-distribution-2024-05-09/package.json +++ b/clients/amazon-warehousing-and-distribution-2024-05-09/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/aplus-content-api-2020-11-01/__tests__/client.spec.ts b/clients/aplus-content-api-2020-11-01/__tests__/client.spec.ts deleted file mode 100644 index 7854eb98bd..0000000000 --- a/clients/aplus-content-api-2020-11-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {AplusContentApiClient, clientRateLimits} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new AplusContentApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(AplusContentApiClient) - }) -}) diff --git a/clients/aplus-content-api-2020-11-01/jest.config.ts b/clients/aplus-content-api-2020-11-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/aplus-content-api-2020-11-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/aplus-content-api-2020-11-01/package.json b/clients/aplus-content-api-2020-11-01/package.json index 30799c411d..0a035c0e25 100644 --- a/clients/aplus-content-api-2020-11-01/package.json +++ b/clients/aplus-content-api-2020-11-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/application-integrations-api-2024-04-01/__tests__/client.spec.ts b/clients/application-integrations-api-2024-04-01/__tests__/client.spec.ts deleted file mode 100644 index 8d13ed00d9..0000000000 --- a/clients/application-integrations-api-2024-04-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {ApplicationIntegrationsApiClient, clientRateLimits} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ApplicationIntegrationsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ApplicationIntegrationsApiClient) - }) -}) diff --git a/clients/application-integrations-api-2024-04-01/jest.config.ts b/clients/application-integrations-api-2024-04-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/application-integrations-api-2024-04-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/application-integrations-api-2024-04-01/package.json b/clients/application-integrations-api-2024-04-01/package.json index 302d3a1018..564d1dc86b 100644 --- a/clients/application-integrations-api-2024-04-01/package.json +++ b/clients/application-integrations-api-2024-04-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/application-management-api-2023-11-30/__tests__/client.spec.ts b/clients/application-management-api-2023-11-30/__tests__/client.spec.ts deleted file mode 100644 index 5e85293891..0000000000 --- a/clients/application-management-api-2023-11-30/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {ApplicationManagementApiClient, clientRateLimits} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ApplicationManagementApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ApplicationManagementApiClient) - }) -}) diff --git a/clients/application-management-api-2023-11-30/jest.config.ts b/clients/application-management-api-2023-11-30/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/application-management-api-2023-11-30/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/application-management-api-2023-11-30/package.json b/clients/application-management-api-2023-11-30/package.json index d2be88626e..70dc7ce75a 100644 --- a/clients/application-management-api-2023-11-30/package.json +++ b/clients/application-management-api-2023-11-30/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/catalog-items-api-2020-12-01/__tests__/client.spec.ts b/clients/catalog-items-api-2020-12-01/__tests__/client.spec.ts deleted file mode 100644 index a91d8c50bf..0000000000 --- a/clients/catalog-items-api-2020-12-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {CatalogItemsApiClient, clientRateLimits} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new CatalogItemsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(CatalogItemsApiClient) - }) -}) diff --git a/clients/catalog-items-api-2020-12-01/jest.config.ts b/clients/catalog-items-api-2020-12-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/catalog-items-api-2020-12-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/catalog-items-api-2020-12-01/package.json b/clients/catalog-items-api-2020-12-01/package.json index 722d3a841a..050862b9ac 100644 --- a/clients/catalog-items-api-2020-12-01/package.json +++ b/clients/catalog-items-api-2020-12-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/catalog-items-api-2022-04-01/__tests__/client.spec.ts b/clients/catalog-items-api-2022-04-01/__tests__/client.spec.ts deleted file mode 100644 index a91d8c50bf..0000000000 --- a/clients/catalog-items-api-2022-04-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {CatalogItemsApiClient, clientRateLimits} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new CatalogItemsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(CatalogItemsApiClient) - }) -}) diff --git a/clients/catalog-items-api-2022-04-01/jest.config.ts b/clients/catalog-items-api-2022-04-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/catalog-items-api-2022-04-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/catalog-items-api-2022-04-01/package.json b/clients/catalog-items-api-2022-04-01/package.json index c411797319..00e459d0fc 100644 --- a/clients/catalog-items-api-2022-04-01/package.json +++ b/clients/catalog-items-api-2022-04-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/catalog-items-api-v0/__tests__/client.spec.ts b/clients/catalog-items-api-v0/__tests__/client.spec.ts deleted file mode 100644 index a91d8c50bf..0000000000 --- a/clients/catalog-items-api-v0/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {CatalogItemsApiClient, clientRateLimits} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new CatalogItemsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(CatalogItemsApiClient) - }) -}) diff --git a/clients/catalog-items-api-v0/jest.config.ts b/clients/catalog-items-api-v0/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/catalog-items-api-v0/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/catalog-items-api-v0/package.json b/clients/catalog-items-api-v0/package.json index 8f4dd7852c..f58280d39b 100644 --- a/clients/catalog-items-api-v0/package.json +++ b/clients/catalog-items-api-v0/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/data-kiosk-api-2023-11-15/__tests__/client.spec.ts b/clients/data-kiosk-api-2023-11-15/__tests__/client.spec.ts deleted file mode 100644 index 07e11b6a3a..0000000000 --- a/clients/data-kiosk-api-2023-11-15/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, DataKioskApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new DataKioskApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(DataKioskApiClient) - }) -}) diff --git a/clients/data-kiosk-api-2023-11-15/jest.config.ts b/clients/data-kiosk-api-2023-11-15/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/data-kiosk-api-2023-11-15/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/data-kiosk-api-2023-11-15/package.json b/clients/data-kiosk-api-2023-11-15/package.json index b83d85a81f..9801531bc2 100644 --- a/clients/data-kiosk-api-2023-11-15/package.json +++ b/clients/data-kiosk-api-2023-11-15/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/easy-ship-2022-03-23/__tests__/client.spec.ts b/clients/easy-ship-2022-03-23/__tests__/client.spec.ts deleted file mode 100644 index 4ca3c41d07..0000000000 --- a/clients/easy-ship-2022-03-23/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, EasyShipClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new EasyShipClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(EasyShipClient) - }) -}) diff --git a/clients/easy-ship-2022-03-23/jest.config.ts b/clients/easy-ship-2022-03-23/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/easy-ship-2022-03-23/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/easy-ship-2022-03-23/package.json b/clients/easy-ship-2022-03-23/package.json index ecad6944a7..8d68d17188 100644 --- a/clients/easy-ship-2022-03-23/package.json +++ b/clients/easy-ship-2022-03-23/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/fba-inbound-eligibility-api-v1/__tests__/client.spec.ts b/clients/fba-inbound-eligibility-api-v1/__tests__/client.spec.ts deleted file mode 100644 index 5f1b83e836..0000000000 --- a/clients/fba-inbound-eligibility-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, FbaInboundEligibilityApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new FbaInboundEligibilityApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(FbaInboundEligibilityApiClient) - }) -}) diff --git a/clients/fba-inbound-eligibility-api-v1/jest.config.ts b/clients/fba-inbound-eligibility-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/fba-inbound-eligibility-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/fba-inbound-eligibility-api-v1/package.json b/clients/fba-inbound-eligibility-api-v1/package.json index a789b6bcbd..fc5d530cac 100644 --- a/clients/fba-inbound-eligibility-api-v1/package.json +++ b/clients/fba-inbound-eligibility-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/fba-inventory-api-v1/__tests__/client.spec.ts b/clients/fba-inventory-api-v1/__tests__/client.spec.ts deleted file mode 100644 index d7c19279f0..0000000000 --- a/clients/fba-inventory-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, FbaInventoryApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new FbaInventoryApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(FbaInventoryApiClient) - }) -}) diff --git a/clients/fba-inventory-api-v1/jest.config.ts b/clients/fba-inventory-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/fba-inventory-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/fba-inventory-api-v1/package.json b/clients/fba-inventory-api-v1/package.json index b1762eb542..045b73d221 100644 --- a/clients/fba-inventory-api-v1/package.json +++ b/clients/fba-inventory-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/feeds-api-2020-09-04/__tests__/client.spec.ts b/clients/feeds-api-2020-09-04/__tests__/client.spec.ts deleted file mode 100644 index a0913afb0d..0000000000 --- a/clients/feeds-api-2020-09-04/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, FeedsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new FeedsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(FeedsApiClient) - }) -}) diff --git a/clients/feeds-api-2020-09-04/jest.config.ts b/clients/feeds-api-2020-09-04/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/feeds-api-2020-09-04/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/feeds-api-2020-09-04/package.json b/clients/feeds-api-2020-09-04/package.json index 1a65a4ae34..5cc97428c8 100644 --- a/clients/feeds-api-2020-09-04/package.json +++ b/clients/feeds-api-2020-09-04/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/feeds-api-2021-06-30/__tests__/client.spec.ts b/clients/feeds-api-2021-06-30/__tests__/client.spec.ts deleted file mode 100644 index a0913afb0d..0000000000 --- a/clients/feeds-api-2021-06-30/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, FeedsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new FeedsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(FeedsApiClient) - }) -}) diff --git a/clients/feeds-api-2021-06-30/jest.config.ts b/clients/feeds-api-2021-06-30/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/feeds-api-2021-06-30/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/feeds-api-2021-06-30/package.json b/clients/feeds-api-2021-06-30/package.json index 429aea332a..ce0bba0abf 100644 --- a/clients/feeds-api-2021-06-30/package.json +++ b/clients/feeds-api-2021-06-30/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/finances-api-2024-06-19/__tests__/client.spec.ts b/clients/finances-api-2024-06-19/__tests__/client.spec.ts deleted file mode 100644 index efd0a55ec5..0000000000 --- a/clients/finances-api-2024-06-19/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, FinancesApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new FinancesApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(FinancesApiClient) - }) -}) diff --git a/clients/finances-api-2024-06-19/jest.config.ts b/clients/finances-api-2024-06-19/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/finances-api-2024-06-19/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/finances-api-2024-06-19/package.json b/clients/finances-api-2024-06-19/package.json index d2153d4c8b..fda3190b2d 100644 --- a/clients/finances-api-2024-06-19/package.json +++ b/clients/finances-api-2024-06-19/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/finances-api-v0/__tests__/client.spec.ts b/clients/finances-api-v0/__tests__/client.spec.ts deleted file mode 100644 index efd0a55ec5..0000000000 --- a/clients/finances-api-v0/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, FinancesApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new FinancesApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(FinancesApiClient) - }) -}) diff --git a/clients/finances-api-v0/jest.config.ts b/clients/finances-api-v0/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/finances-api-v0/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/finances-api-v0/package.json b/clients/finances-api-v0/package.json index ec7df3c38a..a0f353c1f8 100644 --- a/clients/finances-api-v0/package.json +++ b/clients/finances-api-v0/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/fulfillment-inbound-api-2024-03-20/__tests__/client.spec.ts b/clients/fulfillment-inbound-api-2024-03-20/__tests__/client.spec.ts deleted file mode 100644 index 88a7d50dd1..0000000000 --- a/clients/fulfillment-inbound-api-2024-03-20/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, FulfillmentInboundApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new FulfillmentInboundApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(FulfillmentInboundApiClient) - }) -}) diff --git a/clients/fulfillment-inbound-api-2024-03-20/jest.config.ts b/clients/fulfillment-inbound-api-2024-03-20/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/fulfillment-inbound-api-2024-03-20/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/fulfillment-inbound-api-2024-03-20/package.json b/clients/fulfillment-inbound-api-2024-03-20/package.json index dc6ec877c8..648cd4ec6a 100644 --- a/clients/fulfillment-inbound-api-2024-03-20/package.json +++ b/clients/fulfillment-inbound-api-2024-03-20/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/fulfillment-inbound-api-v0/__tests__/client.spec.ts b/clients/fulfillment-inbound-api-v0/__tests__/client.spec.ts deleted file mode 100644 index 88a7d50dd1..0000000000 --- a/clients/fulfillment-inbound-api-v0/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, FulfillmentInboundApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new FulfillmentInboundApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(FulfillmentInboundApiClient) - }) -}) diff --git a/clients/fulfillment-inbound-api-v0/jest.config.ts b/clients/fulfillment-inbound-api-v0/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/fulfillment-inbound-api-v0/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/fulfillment-inbound-api-v0/package.json b/clients/fulfillment-inbound-api-v0/package.json index e52f53a71a..e120264f13 100644 --- a/clients/fulfillment-inbound-api-v0/package.json +++ b/clients/fulfillment-inbound-api-v0/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/fulfillment-outbound-api-2020-07-01/__tests__/client.spec.ts b/clients/fulfillment-outbound-api-2020-07-01/__tests__/client.spec.ts deleted file mode 100644 index 0a7f32e821..0000000000 --- a/clients/fulfillment-outbound-api-2020-07-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, FulfillmentOutboundApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new FulfillmentOutboundApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(FulfillmentOutboundApiClient) - }) -}) diff --git a/clients/fulfillment-outbound-api-2020-07-01/jest.config.ts b/clients/fulfillment-outbound-api-2020-07-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/fulfillment-outbound-api-2020-07-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/fulfillment-outbound-api-2020-07-01/package.json b/clients/fulfillment-outbound-api-2020-07-01/package.json index c59b2a01b8..f752700651 100644 --- a/clients/fulfillment-outbound-api-2020-07-01/package.json +++ b/clients/fulfillment-outbound-api-2020-07-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/invoices-api-2024-06-19/__tests__/client.spec.ts b/clients/invoices-api-2024-06-19/__tests__/client.spec.ts deleted file mode 100644 index 59ebe83462..0000000000 --- a/clients/invoices-api-2024-06-19/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, InvoicesApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new InvoicesApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(InvoicesApiClient) - }) -}) diff --git a/clients/invoices-api-2024-06-19/jest.config.ts b/clients/invoices-api-2024-06-19/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/invoices-api-2024-06-19/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/invoices-api-2024-06-19/package.json b/clients/invoices-api-2024-06-19/package.json index a8189d5b58..a7fd59b74d 100644 --- a/clients/invoices-api-2024-06-19/package.json +++ b/clients/invoices-api-2024-06-19/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/listings-items-api-2020-09-01/__tests__/client.spec.ts b/clients/listings-items-api-2020-09-01/__tests__/client.spec.ts deleted file mode 100644 index 361faaad10..0000000000 --- a/clients/listings-items-api-2020-09-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ListingsItemsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ListingsItemsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ListingsItemsApiClient) - }) -}) diff --git a/clients/listings-items-api-2020-09-01/jest.config.ts b/clients/listings-items-api-2020-09-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/listings-items-api-2020-09-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/listings-items-api-2020-09-01/package.json b/clients/listings-items-api-2020-09-01/package.json index 5f2c6839c3..c50ffde042 100644 --- a/clients/listings-items-api-2020-09-01/package.json +++ b/clients/listings-items-api-2020-09-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/listings-items-api-2021-08-01/__tests__/client.spec.ts b/clients/listings-items-api-2021-08-01/__tests__/client.spec.ts deleted file mode 100644 index 361faaad10..0000000000 --- a/clients/listings-items-api-2021-08-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ListingsItemsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ListingsItemsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ListingsItemsApiClient) - }) -}) diff --git a/clients/listings-items-api-2021-08-01/jest.config.ts b/clients/listings-items-api-2021-08-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/listings-items-api-2021-08-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/listings-items-api-2021-08-01/package.json b/clients/listings-items-api-2021-08-01/package.json index c92ddc4183..63eaaddd6c 100644 --- a/clients/listings-items-api-2021-08-01/package.json +++ b/clients/listings-items-api-2021-08-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/listings-restrictions-api-2021-08-01/__tests__/client.spec.ts b/clients/listings-restrictions-api-2021-08-01/__tests__/client.spec.ts deleted file mode 100644 index 0f601ec8a3..0000000000 --- a/clients/listings-restrictions-api-2021-08-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ListingsRestrictionsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ListingsRestrictionsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ListingsRestrictionsApiClient) - }) -}) diff --git a/clients/listings-restrictions-api-2021-08-01/jest.config.ts b/clients/listings-restrictions-api-2021-08-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/listings-restrictions-api-2021-08-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/listings-restrictions-api-2021-08-01/package.json b/clients/listings-restrictions-api-2021-08-01/package.json index e3fb00255e..ddcaa59f23 100644 --- a/clients/listings-restrictions-api-2021-08-01/package.json +++ b/clients/listings-restrictions-api-2021-08-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/merchant-fulfillment-api-v0/__tests__/client.spec.ts b/clients/merchant-fulfillment-api-v0/__tests__/client.spec.ts deleted file mode 100644 index 3e63d5d241..0000000000 --- a/clients/merchant-fulfillment-api-v0/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, MerchantFulfillmentApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new MerchantFulfillmentApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(MerchantFulfillmentApiClient) - }) -}) diff --git a/clients/merchant-fulfillment-api-v0/jest.config.ts b/clients/merchant-fulfillment-api-v0/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/merchant-fulfillment-api-v0/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/merchant-fulfillment-api-v0/package.json b/clients/merchant-fulfillment-api-v0/package.json index 4a3455ccf2..c0b1790e09 100644 --- a/clients/merchant-fulfillment-api-v0/package.json +++ b/clients/merchant-fulfillment-api-v0/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/messaging-api-v1/__tests__/client.spec.ts b/clients/messaging-api-v1/__tests__/client.spec.ts deleted file mode 100644 index 650bec88fa..0000000000 --- a/clients/messaging-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, MessagingApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new MessagingApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(MessagingApiClient) - }) -}) diff --git a/clients/messaging-api-v1/jest.config.ts b/clients/messaging-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/messaging-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/messaging-api-v1/package.json b/clients/messaging-api-v1/package.json index a5fd944c60..434a37fe8f 100644 --- a/clients/messaging-api-v1/package.json +++ b/clients/messaging-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/notifications-api-v1/__tests__/client.spec.ts b/clients/notifications-api-v1/__tests__/client.spec.ts deleted file mode 100644 index d3913a4d69..0000000000 --- a/clients/notifications-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, NotificationsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new NotificationsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(NotificationsApiClient) - }) -}) diff --git a/clients/notifications-api-v1/jest.config.ts b/clients/notifications-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/notifications-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/notifications-api-v1/package.json b/clients/notifications-api-v1/package.json index df8951391c..ec423e4284 100644 --- a/clients/notifications-api-v1/package.json +++ b/clients/notifications-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/orders-api-v0/__tests__/client.spec.ts b/clients/orders-api-v0/__tests__/client.spec.ts deleted file mode 100644 index 18ae695957..0000000000 --- a/clients/orders-api-v0/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, OrdersApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new OrdersApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(OrdersApiClient) - }) -}) diff --git a/clients/orders-api-v0/jest.config.ts b/clients/orders-api-v0/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/orders-api-v0/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/orders-api-v0/package.json b/clients/orders-api-v0/package.json index 961c8f8d53..9f70d15a37 100644 --- a/clients/orders-api-v0/package.json +++ b/clients/orders-api-v0/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/product-fees-api-v0/__tests__/client.spec.ts b/clients/product-fees-api-v0/__tests__/client.spec.ts deleted file mode 100644 index 942c45f5c4..0000000000 --- a/clients/product-fees-api-v0/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ProductFeesApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ProductFeesApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ProductFeesApiClient) - }) -}) diff --git a/clients/product-fees-api-v0/jest.config.ts b/clients/product-fees-api-v0/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/product-fees-api-v0/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/product-fees-api-v0/package.json b/clients/product-fees-api-v0/package.json index 429be59144..64f7bde75d 100644 --- a/clients/product-fees-api-v0/package.json +++ b/clients/product-fees-api-v0/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/product-pricing-api-2022-05-01/__tests__/client.spec.ts b/clients/product-pricing-api-2022-05-01/__tests__/client.spec.ts deleted file mode 100644 index 4721dae888..0000000000 --- a/clients/product-pricing-api-2022-05-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ProductPricingApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ProductPricingApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ProductPricingApiClient) - }) -}) diff --git a/clients/product-pricing-api-2022-05-01/jest.config.ts b/clients/product-pricing-api-2022-05-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/product-pricing-api-2022-05-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/product-pricing-api-2022-05-01/package.json b/clients/product-pricing-api-2022-05-01/package.json index e3843808e7..1fb54bdf82 100644 --- a/clients/product-pricing-api-2022-05-01/package.json +++ b/clients/product-pricing-api-2022-05-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/product-pricing-api-v0/__tests__/client.spec.ts b/clients/product-pricing-api-v0/__tests__/client.spec.ts deleted file mode 100644 index 4721dae888..0000000000 --- a/clients/product-pricing-api-v0/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ProductPricingApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ProductPricingApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ProductPricingApiClient) - }) -}) diff --git a/clients/product-pricing-api-v0/jest.config.ts b/clients/product-pricing-api-v0/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/product-pricing-api-v0/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/product-pricing-api-v0/package.json b/clients/product-pricing-api-v0/package.json index 38b5276326..d6318df12f 100644 --- a/clients/product-pricing-api-v0/package.json +++ b/clients/product-pricing-api-v0/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/product-type-definitions-api-2020-09-01/__tests__/client.spec.ts b/clients/product-type-definitions-api-2020-09-01/__tests__/client.spec.ts deleted file mode 100644 index 1ed8dc35f1..0000000000 --- a/clients/product-type-definitions-api-2020-09-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ProductTypeDefinitionsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ProductTypeDefinitionsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ProductTypeDefinitionsApiClient) - }) -}) diff --git a/clients/product-type-definitions-api-2020-09-01/jest.config.ts b/clients/product-type-definitions-api-2020-09-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/product-type-definitions-api-2020-09-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/product-type-definitions-api-2020-09-01/package.json b/clients/product-type-definitions-api-2020-09-01/package.json index a55840ffad..1e0ba9f305 100644 --- a/clients/product-type-definitions-api-2020-09-01/package.json +++ b/clients/product-type-definitions-api-2020-09-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/replenishment-api-2022-11-07/__tests__/client.spec.ts b/clients/replenishment-api-2022-11-07/__tests__/client.spec.ts deleted file mode 100644 index d85bc933f5..0000000000 --- a/clients/replenishment-api-2022-11-07/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ReplenishmentApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ReplenishmentApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ReplenishmentApiClient) - }) -}) diff --git a/clients/replenishment-api-2022-11-07/jest.config.ts b/clients/replenishment-api-2022-11-07/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/replenishment-api-2022-11-07/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/replenishment-api-2022-11-07/package.json b/clients/replenishment-api-2022-11-07/package.json index 036a41de94..a9db5506b0 100644 --- a/clients/replenishment-api-2022-11-07/package.json +++ b/clients/replenishment-api-2022-11-07/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/reports-api-2020-09-04/__tests__/client.spec.ts b/clients/reports-api-2020-09-04/__tests__/client.spec.ts deleted file mode 100644 index 59377c97af..0000000000 --- a/clients/reports-api-2020-09-04/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ReportsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ReportsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ReportsApiClient) - }) -}) diff --git a/clients/reports-api-2020-09-04/jest.config.ts b/clients/reports-api-2020-09-04/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/reports-api-2020-09-04/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/reports-api-2020-09-04/package.json b/clients/reports-api-2020-09-04/package.json index a68cccf62a..de2992c21b 100644 --- a/clients/reports-api-2020-09-04/package.json +++ b/clients/reports-api-2020-09-04/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/reports-api-2021-06-30/__tests__/client.spec.ts b/clients/reports-api-2021-06-30/__tests__/client.spec.ts deleted file mode 100644 index 59377c97af..0000000000 --- a/clients/reports-api-2021-06-30/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ReportsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ReportsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ReportsApiClient) - }) -}) diff --git a/clients/reports-api-2021-06-30/jest.config.ts b/clients/reports-api-2021-06-30/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/reports-api-2021-06-30/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/reports-api-2021-06-30/package.json b/clients/reports-api-2021-06-30/package.json index eaaf05f9e9..4a8f218a30 100644 --- a/clients/reports-api-2021-06-30/package.json +++ b/clients/reports-api-2021-06-30/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/sales-api-v1/__tests__/client.spec.ts b/clients/sales-api-v1/__tests__/client.spec.ts deleted file mode 100644 index e1ebfb681c..0000000000 --- a/clients/sales-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, SalesApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new SalesApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(SalesApiClient) - }) -}) diff --git a/clients/sales-api-v1/jest.config.ts b/clients/sales-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/sales-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/sales-api-v1/package.json b/clients/sales-api-v1/package.json index b0a16185b5..1af50d924d 100644 --- a/clients/sales-api-v1/package.json +++ b/clients/sales-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/sellers-api-v1/__tests__/client.spec.ts b/clients/sellers-api-v1/__tests__/client.spec.ts deleted file mode 100644 index 71969a38cc..0000000000 --- a/clients/sellers-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, SellersApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new SellersApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(SellersApiClient) - }) -}) diff --git a/clients/sellers-api-v1/jest.config.ts b/clients/sellers-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/sellers-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/sellers-api-v1/package.json b/clients/sellers-api-v1/package.json index f9a07f90f7..972015dbb1 100644 --- a/clients/sellers-api-v1/package.json +++ b/clients/sellers-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/services-api-v1/__tests__/client.spec.ts b/clients/services-api-v1/__tests__/client.spec.ts deleted file mode 100644 index d20e0878d8..0000000000 --- a/clients/services-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ServicesApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ServicesApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ServicesApiClient) - }) -}) diff --git a/clients/services-api-v1/jest.config.ts b/clients/services-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/services-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/services-api-v1/package.json b/clients/services-api-v1/package.json index e611e056c9..8ed23a606d 100644 --- a/clients/services-api-v1/package.json +++ b/clients/services-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/shipment-invoicing-api-v0/__tests__/client.spec.ts b/clients/shipment-invoicing-api-v0/__tests__/client.spec.ts deleted file mode 100644 index f36fc44ee4..0000000000 --- a/clients/shipment-invoicing-api-v0/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ShipmentInvoicingApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ShipmentInvoicingApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ShipmentInvoicingApiClient) - }) -}) diff --git a/clients/shipment-invoicing-api-v0/jest.config.ts b/clients/shipment-invoicing-api-v0/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/shipment-invoicing-api-v0/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/shipment-invoicing-api-v0/package.json b/clients/shipment-invoicing-api-v0/package.json index 7ab1419bcc..1c2b35c96d 100644 --- a/clients/shipment-invoicing-api-v0/package.json +++ b/clients/shipment-invoicing-api-v0/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/shipping-api-v1/__tests__/client.spec.ts b/clients/shipping-api-v1/__tests__/client.spec.ts deleted file mode 100644 index 88ce0abdbd..0000000000 --- a/clients/shipping-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ShippingApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ShippingApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ShippingApiClient) - }) -}) diff --git a/clients/shipping-api-v1/jest.config.ts b/clients/shipping-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/shipping-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/shipping-api-v1/package.json b/clients/shipping-api-v1/package.json index 56e56d979e..f0512e2f19 100644 --- a/clients/shipping-api-v1/package.json +++ b/clients/shipping-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/shipping-api-v2/__tests__/client.spec.ts b/clients/shipping-api-v2/__tests__/client.spec.ts deleted file mode 100644 index 88ce0abdbd..0000000000 --- a/clients/shipping-api-v2/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, ShippingApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new ShippingApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(ShippingApiClient) - }) -}) diff --git a/clients/shipping-api-v2/jest.config.ts b/clients/shipping-api-v2/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/shipping-api-v2/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/shipping-api-v2/package.json b/clients/shipping-api-v2/package.json index 36bd186a83..1293113915 100644 --- a/clients/shipping-api-v2/package.json +++ b/clients/shipping-api-v2/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/solicitations-api-v1/__tests__/client.spec.ts b/clients/solicitations-api-v1/__tests__/client.spec.ts deleted file mode 100644 index 6a4fc70b2e..0000000000 --- a/clients/solicitations-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, SolicitationsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new SolicitationsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(SolicitationsApiClient) - }) -}) diff --git a/clients/solicitations-api-v1/jest.config.ts b/clients/solicitations-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/solicitations-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/solicitations-api-v1/package.json b/clients/solicitations-api-v1/package.json index 8064b0e478..c20d441dad 100644 --- a/clients/solicitations-api-v1/package.json +++ b/clients/solicitations-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/supply-sources-api-2020-07-01/__tests__/client.spec.ts b/clients/supply-sources-api-2020-07-01/__tests__/client.spec.ts deleted file mode 100644 index 8958c6eaa0..0000000000 --- a/clients/supply-sources-api-2020-07-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, SupplySourcesApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new SupplySourcesApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(SupplySourcesApiClient) - }) -}) diff --git a/clients/supply-sources-api-2020-07-01/jest.config.ts b/clients/supply-sources-api-2020-07-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/supply-sources-api-2020-07-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/supply-sources-api-2020-07-01/package.json b/clients/supply-sources-api-2020-07-01/package.json index b27f2d12fa..716a637f8c 100644 --- a/clients/supply-sources-api-2020-07-01/package.json +++ b/clients/supply-sources-api-2020-07-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/tokens-api-2021-03-01/__tests__/client.spec.ts b/clients/tokens-api-2021-03-01/__tests__/client.spec.ts deleted file mode 100644 index 26807d7d64..0000000000 --- a/clients/tokens-api-2021-03-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, TokensApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new TokensApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(TokensApiClient) - }) -}) diff --git a/clients/tokens-api-2021-03-01/jest.config.ts b/clients/tokens-api-2021-03-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/tokens-api-2021-03-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/tokens-api-2021-03-01/package.json b/clients/tokens-api-2021-03-01/package.json index daf89deed6..b4072241ba 100644 --- a/clients/tokens-api-2021-03-01/package.json +++ b/clients/tokens-api-2021-03-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/uploads-api-2020-11-01/__tests__/client.spec.ts b/clients/uploads-api-2020-11-01/__tests__/client.spec.ts deleted file mode 100644 index 49ed5231fe..0000000000 --- a/clients/uploads-api-2020-11-01/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, UploadsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new UploadsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(UploadsApiClient) - }) -}) diff --git a/clients/uploads-api-2020-11-01/jest.config.ts b/clients/uploads-api-2020-11-01/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/uploads-api-2020-11-01/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/uploads-api-2020-11-01/package.json b/clients/uploads-api-2020-11-01/package.json index b073adb4dc..bccc1792d8 100644 --- a/clients/uploads-api-2020-11-01/package.json +++ b/clients/uploads-api-2020-11-01/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-direct-fulfillment-inventory-api-v1/__tests__/client.spec.ts b/clients/vendor-direct-fulfillment-inventory-api-v1/__tests__/client.spec.ts deleted file mode 100644 index ed1caea6bf..0000000000 --- a/clients/vendor-direct-fulfillment-inventory-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorDirectFulfillmentInventoryApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorDirectFulfillmentInventoryApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorDirectFulfillmentInventoryApiClient) - }) -}) diff --git a/clients/vendor-direct-fulfillment-inventory-api-v1/jest.config.ts b/clients/vendor-direct-fulfillment-inventory-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-direct-fulfillment-inventory-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-direct-fulfillment-inventory-api-v1/package.json b/clients/vendor-direct-fulfillment-inventory-api-v1/package.json index 1e8f61268b..c3310007a9 100644 --- a/clients/vendor-direct-fulfillment-inventory-api-v1/package.json +++ b/clients/vendor-direct-fulfillment-inventory-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-direct-fulfillment-orders-api-2021-12-28/__tests__/client.spec.ts b/clients/vendor-direct-fulfillment-orders-api-2021-12-28/__tests__/client.spec.ts deleted file mode 100644 index cd70c53690..0000000000 --- a/clients/vendor-direct-fulfillment-orders-api-2021-12-28/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorDirectFulfillmentOrdersApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorDirectFulfillmentOrdersApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorDirectFulfillmentOrdersApiClient) - }) -}) diff --git a/clients/vendor-direct-fulfillment-orders-api-2021-12-28/jest.config.ts b/clients/vendor-direct-fulfillment-orders-api-2021-12-28/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-direct-fulfillment-orders-api-2021-12-28/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-direct-fulfillment-orders-api-2021-12-28/package.json b/clients/vendor-direct-fulfillment-orders-api-2021-12-28/package.json index 3193317b58..c496ac4eb4 100644 --- a/clients/vendor-direct-fulfillment-orders-api-2021-12-28/package.json +++ b/clients/vendor-direct-fulfillment-orders-api-2021-12-28/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-direct-fulfillment-orders-api-v1/__tests__/client.spec.ts b/clients/vendor-direct-fulfillment-orders-api-v1/__tests__/client.spec.ts deleted file mode 100644 index cd70c53690..0000000000 --- a/clients/vendor-direct-fulfillment-orders-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorDirectFulfillmentOrdersApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorDirectFulfillmentOrdersApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorDirectFulfillmentOrdersApiClient) - }) -}) diff --git a/clients/vendor-direct-fulfillment-orders-api-v1/jest.config.ts b/clients/vendor-direct-fulfillment-orders-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-direct-fulfillment-orders-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-direct-fulfillment-orders-api-v1/package.json b/clients/vendor-direct-fulfillment-orders-api-v1/package.json index f40c47c71d..0c16016b49 100644 --- a/clients/vendor-direct-fulfillment-orders-api-v1/package.json +++ b/clients/vendor-direct-fulfillment-orders-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-direct-fulfillment-payments-api-v1/__tests__/client.spec.ts b/clients/vendor-direct-fulfillment-payments-api-v1/__tests__/client.spec.ts deleted file mode 100644 index ad89b5c3fc..0000000000 --- a/clients/vendor-direct-fulfillment-payments-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorDirectFulfillmentPaymentsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorDirectFulfillmentPaymentsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorDirectFulfillmentPaymentsApiClient) - }) -}) diff --git a/clients/vendor-direct-fulfillment-payments-api-v1/jest.config.ts b/clients/vendor-direct-fulfillment-payments-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-direct-fulfillment-payments-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-direct-fulfillment-payments-api-v1/package.json b/clients/vendor-direct-fulfillment-payments-api-v1/package.json index 3c9428ce7c..f13ba6fde6 100644 --- a/clients/vendor-direct-fulfillment-payments-api-v1/package.json +++ b/clients/vendor-direct-fulfillment-payments-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/__tests__/client.spec.ts b/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/__tests__/client.spec.ts deleted file mode 100644 index d8c06dea9a..0000000000 --- a/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorDirectFulfillmentSandboxTestDataApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorDirectFulfillmentSandboxTestDataApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorDirectFulfillmentSandboxTestDataApiClient) - }) -}) diff --git a/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/jest.config.ts b/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/package.json b/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/package.json index 241f35846a..9742cbdb4c 100644 --- a/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/package.json +++ b/clients/vendor-direct-fulfillment-sandbox-test-data-api-2021-10-28/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/__tests__/client.spec.ts b/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/__tests__/client.spec.ts deleted file mode 100644 index bd69636bba..0000000000 --- a/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorDirectFulfillmentShippingApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorDirectFulfillmentShippingApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorDirectFulfillmentShippingApiClient) - }) -}) diff --git a/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/jest.config.ts b/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/package.json b/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/package.json index 07449e12d0..bdf59f08a7 100644 --- a/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/package.json +++ b/clients/vendor-direct-fulfillment-shipping-api-2021-12-28/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-direct-fulfillment-shipping-api-v1/__tests__/client.spec.ts b/clients/vendor-direct-fulfillment-shipping-api-v1/__tests__/client.spec.ts deleted file mode 100644 index bd69636bba..0000000000 --- a/clients/vendor-direct-fulfillment-shipping-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorDirectFulfillmentShippingApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorDirectFulfillmentShippingApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorDirectFulfillmentShippingApiClient) - }) -}) diff --git a/clients/vendor-direct-fulfillment-shipping-api-v1/jest.config.ts b/clients/vendor-direct-fulfillment-shipping-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-direct-fulfillment-shipping-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-direct-fulfillment-shipping-api-v1/package.json b/clients/vendor-direct-fulfillment-shipping-api-v1/package.json index 1825a0e101..e860fa794e 100644 --- a/clients/vendor-direct-fulfillment-shipping-api-v1/package.json +++ b/clients/vendor-direct-fulfillment-shipping-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/__tests__/client.spec.ts b/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/__tests__/client.spec.ts deleted file mode 100644 index 6adf2f5b89..0000000000 --- a/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorDirectFulfillmentTransactionsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorDirectFulfillmentTransactionsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorDirectFulfillmentTransactionsApiClient) - }) -}) diff --git a/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/jest.config.ts b/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/package.json b/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/package.json index 02a89ace40..a2796392e9 100644 --- a/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/package.json +++ b/clients/vendor-direct-fulfillment-transactions-api-2021-12-28/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-direct-fulfillment-transactions-api-v1/__tests__/client.spec.ts b/clients/vendor-direct-fulfillment-transactions-api-v1/__tests__/client.spec.ts deleted file mode 100644 index 6adf2f5b89..0000000000 --- a/clients/vendor-direct-fulfillment-transactions-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorDirectFulfillmentTransactionsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorDirectFulfillmentTransactionsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorDirectFulfillmentTransactionsApiClient) - }) -}) diff --git a/clients/vendor-direct-fulfillment-transactions-api-v1/jest.config.ts b/clients/vendor-direct-fulfillment-transactions-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-direct-fulfillment-transactions-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-direct-fulfillment-transactions-api-v1/package.json b/clients/vendor-direct-fulfillment-transactions-api-v1/package.json index 80ac705de0..10dc0abcf9 100644 --- a/clients/vendor-direct-fulfillment-transactions-api-v1/package.json +++ b/clients/vendor-direct-fulfillment-transactions-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-invoices-api-v1/__tests__/client.spec.ts b/clients/vendor-invoices-api-v1/__tests__/client.spec.ts deleted file mode 100644 index 1b3e53dc0a..0000000000 --- a/clients/vendor-invoices-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorInvoicesApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorInvoicesApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorInvoicesApiClient) - }) -}) diff --git a/clients/vendor-invoices-api-v1/jest.config.ts b/clients/vendor-invoices-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-invoices-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-invoices-api-v1/package.json b/clients/vendor-invoices-api-v1/package.json index 85fb650fab..70b092a969 100644 --- a/clients/vendor-invoices-api-v1/package.json +++ b/clients/vendor-invoices-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-orders-api-v1/__tests__/client.spec.ts b/clients/vendor-orders-api-v1/__tests__/client.spec.ts deleted file mode 100644 index 2b70a1aa25..0000000000 --- a/clients/vendor-orders-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorOrdersApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorOrdersApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorOrdersApiClient) - }) -}) diff --git a/clients/vendor-orders-api-v1/jest.config.ts b/clients/vendor-orders-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-orders-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-orders-api-v1/package.json b/clients/vendor-orders-api-v1/package.json index 632837d10a..fff0c2ca72 100644 --- a/clients/vendor-orders-api-v1/package.json +++ b/clients/vendor-orders-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-shipments-api-v1/__tests__/client.spec.ts b/clients/vendor-shipments-api-v1/__tests__/client.spec.ts deleted file mode 100644 index 803941cda3..0000000000 --- a/clients/vendor-shipments-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorShipmentsApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorShipmentsApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorShipmentsApiClient) - }) -}) diff --git a/clients/vendor-shipments-api-v1/jest.config.ts b/clients/vendor-shipments-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-shipments-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-shipments-api-v1/package.json b/clients/vendor-shipments-api-v1/package.json index 71ad32ecfe..301b680d22 100644 --- a/clients/vendor-shipments-api-v1/package.json +++ b/clients/vendor-shipments-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/clients/vendor-transaction-status-api-v1/__tests__/client.spec.ts b/clients/vendor-transaction-status-api-v1/__tests__/client.spec.ts deleted file mode 100644 index f3a9f7f4b8..0000000000 --- a/clients/vendor-transaction-status-api-v1/__tests__/client.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -import {clientRateLimits, VendorTransactionStatusApiClient} from '../src/client' - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new VendorTransactionStatusApiClient(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf(VendorTransactionStatusApiClient) - }) -}) diff --git a/clients/vendor-transaction-status-api-v1/jest.config.ts b/clients/vendor-transaction-status-api-v1/jest.config.ts deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/clients/vendor-transaction-status-api-v1/jest.config.ts +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/clients/vendor-transaction-status-api-v1/package.json b/clients/vendor-transaction-status-api-v1/package.json index de255cf5a9..04a17cebc6 100644 --- a/clients/vendor-transaction-status-api-v1/package.json +++ b/clients/vendor-transaction-status-api-v1/package.json @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/codegen/generate-clients.ts b/codegen/generate-clients.ts index 0d463c8119..806468c990 100644 --- a/codegen/generate-clients.ts +++ b/codegen/generate-clients.ts @@ -116,7 +116,6 @@ async function generateClientVersion(modelFilePath: string) { -o ${clientDirectoryPath}/src/api-model`, ) - await fs.mkdir(`${clientDirectoryPath}/__tests__`, {recursive: true}) await fs.writeFile( `${clientDirectoryPath}/package.json`, await renderTemplate('codegen/templates/package.json.mustache', { @@ -218,14 +217,6 @@ async function generateClientVersion(modelFilePath: string) { grantlessScope: grantlessInfo?.scope, }), ) - await fs.writeFile( - `${clientDirectoryPath}/__tests__/client.spec.ts`, - await renderTemplate('codegen/templates/__tests__/client.spec.ts.mustache', {clientClassName}), - ) - await fs.writeFile( - `${clientDirectoryPath}/jest.config.ts`, - await renderTemplate('codegen/templates/jest.config.ts.mustache'), - ) const generatedFiles = await fs.readdir(`${clientDirectoryPath}/src/api-model/`) const filesToKeep = new Set([ diff --git a/codegen/templates/__tests__/client.spec.ts.mustache b/codegen/templates/__tests__/client.spec.ts.mustache deleted file mode 100644 index 0892d1d09c..0000000000 --- a/codegen/templates/__tests__/client.spec.ts.mustache +++ /dev/null @@ -1,41 +0,0 @@ -import {SellingPartnerApiAuth} from '@sp-api-sdk/auth' -import {type ClientConfiguration, createAxiosInstance} from '@sp-api-sdk/common' - -{{=<% %>=}} -import {clientRateLimits, <%clientClassName%>} from '../src/client' -<%={{ }}=%> - -jest.mock('@sp-api-sdk/auth', () => ({ - SellingPartnerApiAuth: jest.fn(() => ({ - accessToken: { - get: jest.fn(() => 'FAKE_ACCESS_TOKEN'), - }, - getCredentials: jest.fn(), - })), -})) - -jest.mock('@sp-api-sdk/common', () => ({ - ...jest.requireActual('@sp-api-sdk/common'), - createAxiosInstance: jest.fn(() => ({axios: undefined, enpoint: undefined})), -})) - -describe('src/client', () => { - it('should create a client instance', () => { - const configuration: ClientConfiguration = { - auth: new SellingPartnerApiAuth({refreshToken: ''}), - region: 'eu', - userAgent: 'USER_AGENT', - sandbox: false, - } - - const client = new {{clientClassName}}(configuration) - - expect(createAxiosInstance).toBeCalledTimes(1) - expect((createAxiosInstance as jest.Mock).mock.calls[0]).toEqual([ - configuration, - clientRateLimits, - ]) - - expect(client).toBeInstanceOf({{clientClassName}}) - }) -}) diff --git a/codegen/templates/jest.config.ts.mustache b/codegen/templates/jest.config.ts.mustache deleted file mode 100644 index 6d0dc44d95..0000000000 --- a/codegen/templates/jest.config.ts.mustache +++ /dev/null @@ -1 +0,0 @@ -export {default} from '../../jest.config' diff --git a/codegen/templates/package.json.mustache b/codegen/templates/package.json.mustache index c2554cf73d..141c41d8d1 100644 --- a/codegen/templates/package.json.mustache +++ b/codegen/templates/package.json.mustache @@ -22,8 +22,7 @@ "build:cjs": "tsc -p tsconfig.json", "build:es": "tsc -p tsconfig.es.json", "build": "pnpm build:cjs && pnpm build:es", - "clean": "rimraf dist", - "test": "jest" + "clean": "rimraf dist" }, "dependencies": { "@sp-api-sdk/common": "workspace:*", diff --git a/jest.config.ts b/jest.config.ts index fdbe27b1c8..7b63ec9dae 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -13,7 +13,6 @@ export default async function setup(): Promise { clearMocks: true, collectCoverage: true, collectCoverageFrom: ['src/**.ts'], - coveragePathIgnorePatterns: ['src/api-model'], coverageReporters: ['text-summary', 'cobertura'], reporters: ['default', 'github-actions'], }