Ignore comms heartbeat messages in comms test

This commit is contained in:
Nick O'Leary 2014-10-31 13:06:08 +00:00
parent 863b85714d
commit f0e9a0279f
1 changed files with 10 additions and 7 deletions

View File

@ -174,6 +174,8 @@ describe("comms", function() {
});
ws.on('message', function(data) {
var msg = JSON.parse(data);
// It is possible a heartbeat message may arrive - so ignore them
if (msg.topic != "hb") {
msg.should.have.property('topic', 'foo');
msg.should.have.property('data', 'bar');
count++;
@ -182,6 +184,7 @@ describe("comms", function() {
ws.close();
done();
}
}
});
});
});