Mocks for the amqp.node library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test/helpers
.babelrc Support connections & channels Jan 31, 2017
.editorconfig
.eslintignore
.eslintrc.yml
.gitignore
.npmignore
.publishrc
.travis.yml Support connections & channels Jan 31, 2017
CHANGELOG.md
README.md
package-lock.json
package.json

README.md

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