mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore: mqtt updates, integration test improvements
This commit is contained in:
@@ -2,10 +2,11 @@ import { INestApplication } from '@nestjs/common';
|
||||
import { Transport } from '@nestjs/microservices';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import * as request from 'supertest';
|
||||
import { App } from 'supertest/types';
|
||||
import { DisconnectedClientController } from '../src/disconnected.controller';
|
||||
|
||||
describe('Disconnected client', () => {
|
||||
let server;
|
||||
let server: App;
|
||||
let app: INestApplication;
|
||||
|
||||
beforeEach(async () => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from '@nestjs/common';
|
||||
import { ClientProxyFactory } from '@nestjs/microservices';
|
||||
import { Observable, throwError } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
import { catchError, tap } from 'rxjs/operators';
|
||||
|
||||
@Controller()
|
||||
export class DisconnectedClientController {
|
||||
@@ -31,6 +31,9 @@ export class DisconnectedClientController {
|
||||
: new InternalServerErrorException(),
|
||||
);
|
||||
}),
|
||||
tap({
|
||||
error: () => client.close(),
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user