Skip to content

TitanInvest/mock-amqplib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mock-amqplib

This module is intended to replace rabbitMq in integration tests to gain speed in test execution.

Usage

with mock-require in tests:

// setup
var mockRequire = require('mock-require');
mockRequire('amqplib', 'mock-amqplib');

// teardow
mockRequire.stopAll();

or simply overwrite amqplibs connect method:

amqplib.connect = mockAmqplib.connect;

Similar modules:

amqplib-mocks, exp-fake-amqplib (callbacks only), amqplib-mock,

As far as I can tell they try to solve the same problem, but they implemented different parts of the API.

For this module I implemented whatever was neccesary to use it in the app I'm currently developing, so parts are missing here too, pull requests are welcome.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%