mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-01 14:29:09 +00:00
FIX: fixed tests modules
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
import { ClientsModule } from '@nestjs/microservices';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { NetworkConfigClientConfiguration } from './network-config-client.config';
|
||||
import { NetworkConfigController } from './network-config.controller';
|
||||
import { NetworkConfigService } from './network-config.service';
|
||||
import { DadosferaLogger } from 'dadosfera-logs';
|
||||
|
||||
describe('NetworkConfigController', () => {
|
||||
let controller: NetworkConfigController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const client = new NetworkConfigClientConfiguration();
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [NetworkConfigController],
|
||||
providers: [NetworkConfigService, DadosferaLogger],
|
||||
imports: [ClientsModule.register([client.providerOptions])],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<NetworkConfigController>(NetworkConfigController);
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
import { ClientsModule } from '@nestjs/microservices';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { NetworkConfigClientConfiguration } from './network-config-client.config';
|
||||
import { NetworkConfigController } from './network-config.controller';
|
||||
import { NetworkConfigService } from './network-config.service';
|
||||
import { DadosferaLogger } from 'dadosfera-logs';
|
||||
|
||||
describe('NetworkConfigService', () => {
|
||||
let service: NetworkConfigService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const client = new NetworkConfigClientConfiguration();
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [NetworkConfigService],
|
||||
controllers: [NetworkConfigController],
|
||||
providers: [NetworkConfigService, DadosferaLogger],
|
||||
imports: [ClientsModule.register([client.providerOptions])],
|
||||
}).compile();
|
||||
|
||||
service = module.get<NetworkConfigService>(NetworkConfigService);
|
||||
|
||||
Reference in New Issue
Block a user