New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mock-amqplib

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mock-amqplib

stub rabbit mq in integration tests

  • 1.6.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6K
decreased by-52.66%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 20 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc