node tests: Get unread.js to 100% node coverage.

This commit is contained in:
Joshua Pan
2017-06-03 12:25:12 -07:00
committed by showell
parent 0a56156017
commit 6a5c01a36e

View File

@@ -458,5 +458,14 @@ stream_data.get_stream_id = function () {
unread.process_read_message(message);
var counts = unread.get_counts();
assert.equal(counts.private_message_count, 0);
// Test undefined stream_id
message = { type: 'stream' };
global.blueslip.error = function (msg) {
assert.equal(msg, 'No stream_id found for message undefined');
};
unread.process_read_message(message);
}());