UNPKG

ascoltatori

Version:

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

19 lines (16 loc) 509 B
describeAscoltatore("fileSystem", function () { afterEach(function(done) { this.instance.close(done); }); 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 }); }); }); });