bunk / amqplib-mocks Goto Github PK
View Code? Open in Web Editor NEWMocks for the amqp.node library
Mocks for the amqp.node library
It would be a great addition some usage examples ๐
When you assert a queue without a name it should generate one for you ( eg: amq.gen-E3xHFQaudCxqPnW8jMMvjQ
). These are normally used for transient queues which die with the channel.
eg
const {queue} = channel.assertQueue('', {exclusive: true}); // queue = <autoGen name>
https://github.com/squaremo/amqp.node/blob/master/examples/tutorials/receive_logs_topic.js#L21
Currently the assertQueue simply tracks the queues blank name which in turn means no messages get routed to it.
Create a table of what functions is mocked and step by step mock them.
connect
connection.close
connection.createChannel
connection.createConfirmChannel
events
Channel
channel.close
events
channel.assertQueue
channel.checkQueue
channel.deleteQueue
channel.purgeQueue
channel.bindQueue
channel.unbindQueue
channel.assertExchange
channel.checkExchange
channel.deleteExchange
channel.bindExchange
channel.unbindExchange
channel.publish
channel.sendToQueue
channel.consume
channel.cancel
channel.get
channel.ack
channel.ackAll
channel.nack
channel.nackAll
channel.reject
channel.prefetch
channel.recover
ConfirmChannel
confirmChannel.publish
confirmChannel.sendToQueue
confirmChannel.waitForConfirms
Is it possible to test channel on events on('close'), on('error')?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.