You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
611 B
20 lines
611 B
describeAscoltatore("prefix", function() { |
|
|
|
it("should publish messages on the parent with a prefix", function(done) { |
|
var that = this; |
|
this.wrapped.subscribe("/myprefix/hello", wrap(done), function() { |
|
that.instance.publish("/hello", "world"); |
|
}); |
|
}); |
|
|
|
it("should pass options through", function(done) { |
|
var that = this; |
|
var opts = { hello: "world" }; |
|
this.instance.subscribe("/hello", function(topic, payload, receivedOpts) { |
|
expect(receivedOpts).to.eql(opts); |
|
done(); |
|
}, function() { |
|
that.instance.publish("/hello", "world", opts); |
|
}); |
|
}); |
|
});
|
|
|