mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
tests(): fix unit test, disable redis integration test
This commit is contained in:
@@ -6,7 +6,7 @@ import { ClientRMQ } from '../../client/client-rmq';
|
||||
// tslint:disable:no-string-literal
|
||||
|
||||
describe('ClientRQM', () => {
|
||||
const client = new ClientRMQ({});
|
||||
let client: ClientRMQ;
|
||||
|
||||
describe('connect', () => {
|
||||
let createClientStub: sinon.SinonStub;
|
||||
@@ -15,6 +15,7 @@ describe('ClientRQM', () => {
|
||||
let mergeDisconnectEvent: sinon.SinonStub;
|
||||
|
||||
beforeEach(async () => {
|
||||
client = new ClientRMQ({});
|
||||
createClientStub = sinon.stub(client, 'createClient').callsFake(() => ({
|
||||
addListener: () => ({}),
|
||||
removeListener: () => ({}),
|
||||
@@ -33,12 +34,6 @@ describe('ClientRQM', () => {
|
||||
.stub(client, 'mergeDisconnectEvent')
|
||||
.callsFake((_, source) => source);
|
||||
});
|
||||
afterEach(() => {
|
||||
createClientStub.restore();
|
||||
handleErrorsSpy.restore();
|
||||
connect$Stub.restore();
|
||||
mergeDisconnectEvent.restore();
|
||||
});
|
||||
describe('when is not connected', () => {
|
||||
beforeEach(async () => {
|
||||
client['client'] = null;
|
||||
|
||||
Reference in New Issue
Block a user