zblueslip: Convert node_tests/pm_list.js to zblueslip.

This commit is contained in:
Rohitt Vashishtha 2018-05-01 09:31:10 +05:30 committed by Tim Abbott
parent c5d9a052c0
commit 22ca18f59c
1 changed files with 5 additions and 6 deletions

View File

@ -9,7 +9,7 @@ set_global('stream_popover', {
}); });
set_global('unread', {}); set_global('unread', {});
set_global('unread_ui', {}); set_global('unread_ui', {});
set_global('blueslip', {}); set_global('blueslip', global.make_zblueslip());
set_global('popovers', { set_global('popovers', {
hide_all: function () {}, hide_all: function () {},
}); });
@ -45,12 +45,11 @@ global.people.initialize_current_user(me.user_id);
(function test_get_conversation_li() { (function test_get_conversation_li() {
var test_conversation = 'foo@example.com,bar@example.com'; var test_conversation = 'foo@example.com,bar@example.com';
var error_msg; blueslip.set_test_data('warn', 'Unknown conversation: ' + test_conversation);
global.blueslip.warn = function (error) { blueslip.set_test_data('warn', 'Unknown emails: ' + test_conversation); // people.js
error_msg = error;
};
pm_list.get_conversation_li(test_conversation); pm_list.get_conversation_li(test_conversation);
assert.equal(error_msg, 'Unknown conversation: ' + test_conversation); assert.equal(blueslip.get_test_logs('warn').length, 2);
blueslip.clear_test_data();
}()); }());
(function test_close() { (function test_close() {