Skip to content

Commit

Permalink
fix: unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Dec 6, 2022
1 parent 4fcc9be commit dcdc178
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/loaders/tests/services.loader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/modules/multi-tenancy/tests/tenant.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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' }),
Expand Down

0 comments on commit dcdc178

Please sign in to comment.