test(): fix e2e tests

This commit is contained in:
Kamil Myśliwiec
2018-12-05 23:08:03 +01:00
parent a3fbb8816e
commit 42e1e79b31
16 changed files with 65 additions and 50 deletions

View File

@@ -1,7 +1,6 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import * as express from 'express';
import { join } from 'path';
import * as request from 'supertest';
import { GrpcController } from '../src/grpc/grpc.controller';
@@ -15,8 +14,9 @@ describe('GRPC transport', () => {
controllers: [GrpcController],
}).compile();
server = express();
app = module.createNestApplication(server);
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
transport: Transport.GRPC,
options: {