Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 937 Bytes

README.md

File metadata and controls

29 lines (23 loc) · 937 Bytes

amqplib-mocks

NPM Version Build Coverage

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();