exp-fake-amqplib
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 = ;const fakeAmqplib = ; amqplibconnect = fakeAmqpconnect;
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 = ;const fakeAmqp = ; ;