Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_fetch: Refactor stub into the mocked `MessageListView`.
Aman Agrawal9a282ff9ad7f
diff --git a/frontend_tests/node_tests/message_fetch.js b/frontend_tests/node_tests/message_fetch.jsindex 96348492d2a..7de986001e0 100644--- a/frontend_tests/node_tests/message_fetch.js+++ b/frontend_tests/node_tests/message_fetch.js@@ -13,7 +13,11 @@ set_global("document", "document-stub");const noop = () => {};function MessageListView() {- return {};+ return {+ maybe_rerender: noop,+ append: noop,+ prepend: noop,+ };}mock_esm("../../static/js/message_list_view", {MessageListView,@@ -59,12 +63,6 @@ const alice = {};people.add_active_user(alice);-function stub_message_view(list) {- list.view.append = noop;- list.view.maybe_rerender = noop;- list.view.prepend = noop;-}-function make_home_msg_list() {const table_name = "whatever";const filter = new Filter();@@ -80,7 +78,6 @@ function reset_lists() {message_lists.home = make_home_msg_list();message_lists.current = message_lists.home;all_messages_data.clear();- stub_message_view(message_lists.home);}function config_fake_channel(conf) {