UNPKG

ascoltatori

Version:

The pub/sub library for node backed by Redis, MongoDB, AMQP (RabbitMQ), ZeroMQ, Kafka, MQTT (Mosquitto) or just plain node!

14 lines (13 loc) 443 B
describeAscoltatore("eventEmitter2", function() { it("should publish with options", function(done) { var that = this; that.instance.subscribe("hello/*", function(topic, value, options) { expect(value).to.equal("42"); expect(options.qos).to.equal(1); expect(options.messageId).to.equal(5); done(); }, function() { that.instance.publish("hello/123", "42", { qos: 1, messageId: 5 }); }); }); });