From dcdc178edd6d9bc66de39696afca394aa35859c5 Mon Sep 17 00:00:00 2001 From: adrien2p Date: Tue, 6 Dec 2022 10:00:57 +0100 Subject: [PATCH] fix: unit tests --- src/loaders/tests/services.loader.spec.ts | 4 +++- src/modules/multi-tenancy/tests/tenant.service.spec.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/loaders/tests/services.loader.spec.ts b/src/loaders/tests/services.loader.spec.ts index bf57f8ba..b6ae668c 100644 --- a/src/loaders/tests/services.loader.spec.ts +++ b/src/loaders/tests/services.loader.spec.ts @@ -50,7 +50,9 @@ describe('Services loader', () => { .register({ draftOrderService: asFunction(() => void 0) }) .register({ inventoryService: asFunction(() => void 0) }) .register({ eventBusService: asFunction(() => void 0) }) - .register({ featureFlagRouter: asFunction(() => void 0) }); + .register({ featureFlagRouter: asFunction(() => void 0) }) + .register({ taxProviderService: asFunction(() => void 0) }) + .register({ newTotalsService: asFunction(() => void 0) }); }); describe('overrideService', () => { diff --git a/src/modules/multi-tenancy/tests/tenant.service.spec.ts b/src/modules/multi-tenancy/tests/tenant.service.spec.ts index 37602e7f..91645169 100644 --- a/src/modules/multi-tenancy/tests/tenant.service.spec.ts +++ b/src/modules/multi-tenancy/tests/tenant.service.spec.ts @@ -2,7 +2,7 @@ import { asFunction, asValue, createContainer } from 'awilix'; import { TenantService } from '../tenant.service'; import * as typeormFunctions from 'typeorm/globals'; import { Connection, ConnectionManager } from 'typeorm'; -import { resolve } from "path"; +import { resolve } from 'path'; class FakeService { manager: any; @@ -66,7 +66,7 @@ describe('Tenant service', () => { let reqMock; beforeAll(() => { - process.cwd = () => resolve(__dirname, "fixtures") + process.cwd = () => resolve(__dirname, 'fixtures'); container.register({ request: asFunction(() => 'test', { lifetime: 'SCOPED' }), fakeService: asFunction((cradle) => new FakeService(cradle), { lifetime: 'SINGLETON' }),