mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-15 06:19:08 +00:00
26 lines
971 B
TypeScript
26 lines
971 B
TypeScript
import { Test, TestingModule } from '@nestjs/testing';
|
|
import { ConnectionTestController } from './connection-test.controller';
|
|
import { ConnectionTestService } from './connection-test.service';
|
|
import { DadosferaLogger } from 'dadosfera-logs';
|
|
import { ConnectionTestClientConfiguration } from './connection-test-client.config';
|
|
import { ClientsModule } from '@nestjs/microservices';
|
|
|
|
describe('ConnectionTestService', () => {
|
|
let service: ConnectionTestService;
|
|
|
|
beforeEach(async () => {
|
|
const client = new ConnectionTestClientConfiguration();
|
|
const module: TestingModule = await Test.createTestingModule({
|
|
controllers: [ConnectionTestController],
|
|
providers: [ConnectionTestService, DadosferaLogger],
|
|
imports: [ClientsModule.register([client.providerOptions])],
|
|
}).compile();
|
|
|
|
service = module.get<ConnectionTestService>(ConnectionTestService);
|
|
});
|
|
|
|
it('should be defined', () => {
|
|
expect(service).toBeDefined();
|
|
});
|
|
});
|