3.0.3 • Published 4 years ago

exp-fake-amqplib v3.0.3

Weekly downloads
145
License
MIT
Repository
github
Last release
4 years ago

exp-fake-amqplib

Build Statusdependencies Status

Mocked version of https://www.npmjs.com/package/amqplib. Currently only supports the callback API.

Overriding amqplib

You might want to override amqplib with exp-fake-amqplib in tests. This can be done this way:

const amqplib = require("amqplib");
const fakeAmqplib = require("exp-fake-amqplib");

amqplib.connect = fakeAmqp.connect;

If you are using version 2 or higher of exp-amqp-connection you can use mock-require to replace amqplib with exp-fake-amqplib in your tests like this:

const mock = require("mock-require");
const fakeAmqp = require("exp-fake-amqplib");

mock("amqplib/callback_api", fakeAmqp);
3.0.3

4 years ago

3.0.2

5 years ago

3.0.0

6 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago