Skip to content

Commit

Permalink
fix(microservices): adds unit test to rmq server
Browse files Browse the repository at this point in the history
  • Loading branch information
delucca committed Jun 10, 2022
1 parent a3258d5 commit c9f5f01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/microservices/test/server/server-rmq.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ describe('ServerRMQ', () => {
server.listen(callbackSpy);
expect(onStub.getCall(1).args[0]).to.be.equal('disconnect');
});
it('should bind "connectFailed" event to handler', () => {
server.listen(callbackSpy);
expect(onStub.getCall(2).args[0]).to.be.equal('connectFailed');
});
describe('when "start" throws an exception', () => {
it('should call callback with a thrown error as an argument', () => {
const error = new Error('random error');
Expand Down

0 comments on commit c9f5f01

Please sign in to comment.