aedes
aedes copied to clipboard
[question] does the test "unsubscribe throws error" valid?
https://github.com/moscajs/aedes/blob/bba422b7733d9946566647c7300c1b293e8cd8cf/test/client-pub-sub.js#L664-L688
The mocked broker.unsubscribe
is only called by broker.close
.
- Does it expect to be called by
client.subscribe
? - The
Error
does not be raised in clienterror
event. Bug? - The callback in
client.subscribe
does not contain any error argument, does the message int.pass
make sense?
By reading it makes no sense to me too. I think it should be something like:
client.unsubscribe({
topic: 'hello',
qos: 0
}, function (err) {
t.equal(err.message, 'error', 'throws error')
})
@robertsLando so do I, however the callback call doesn't have err
parameter.
I should try it so, I dunno sincerly... let me know if you fix it