tests(): fix unit test, disable redis integration test

This commit is contained in:
Kamil Myśliwiec
2019-07-18 08:30:07 +02:00
parent fc6b35fe13
commit 0dcd010bc9
3 changed files with 8 additions and 10 deletions

View File

@@ -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;