From da10d42f8aa06a9c3dfcbb33410cf654bc6a4df0 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 9 Mar 2021 12:31:47 +0000 Subject: [PATCH] node tests: Remove unneeded set_global for pointer. We eliminated the global pointer a while back. In passing I move the remaining set_global calls together. --- frontend_tests/node_tests/message_store.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/frontend_tests/node_tests/message_store.js b/frontend_tests/node_tests/message_store.js index ede7b6c64a..98f3697fb6 100644 --- a/frontend_tests/node_tests/message_store.js +++ b/frontend_tests/node_tests/message_store.js @@ -8,8 +8,6 @@ const {run_test} = require("../zjsunit/test"); const noop = () => {}; -set_global("document", "document-stub"); - mock_module("stream_topic_history", { add_message: noop, }); @@ -18,6 +16,8 @@ mock_module("recent_senders", { process_message_for_senders: noop, }); +set_global("document", "document-stub"); +set_global("home_msg_list", {}); set_global("page_params", { realm_allow_message_editing: true, is_admin: true, @@ -332,15 +332,6 @@ run_test("message_id_change", () => { }; message_store.add_message_metadata(message); - set_global("pointer", { - furthest_read: 401, - set_furthest_read(value) { - this.furthest_read = value; - }, - }); - - set_global("home_msg_list", {}); - const opts = { old_id: 401, new_id: 402,