amqplib-mocks
v1.3.0
Published
Simple amqplib mocking library
Downloads
2,022
Readme
amqplib-mocks
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();