amqplib-mocks

Simple amqplib mocking library

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
amqplib-mocks
1.3.05 years ago6 years agoMinified + gzip package size for amqplib-mocks in KB

Readme

amqplib-mocks
!NPM Versionnpm-imagenpm-url !Buildci-imageci-url !Coveragecoverage-imagecoverage-url
A simple mocking framework for amqplib. Currently supports the following:
  • Multiple connections
  • Routing messages based on routingKey
  • Retrieving any published messages on a channel
  • Asserting topology
  • The server remotely closing a channel

Usage

const amqplib = require( "amqplib-mocks" );
const proxyquire = require( "proxyquire" );

const server = proxyquire( "./app", { amqplib } );
server.listen();