node_tests: Don’t read from most deprecated global variables.

We still need to write to these globals with set_global because the
code being tested reads from them, but the tests themselves should
never need to read from them.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-02-09 19:53:22 -08:00
parent 34e37cea1c
commit 89aa3155a9
110 changed files with 407 additions and 399 deletions

View File

@@ -13,17 +13,17 @@ set_global("page_params", {
is_guest: false,
});
zrequire("color_data");
const color_data = zrequire("color_data");
zrequire("hash_util");
zrequire("stream_topic_history");
const stream_topic_history = zrequire("stream_topic_history");
const people = zrequire("people");
zrequire("stream_color");
zrequire("stream_data");
const stream_color = zrequire("stream_color");
const stream_data = zrequire("stream_data");
zrequire("FetchStatus", "js/fetch_status");
zrequire("Filter", "js/filter");
zrequire("MessageListData", "js/message_list_data");
zrequire("MessageListView", "js/message_list_view");
zrequire("message_list");
const message_list = zrequire("message_list");
const settings_config = zrequire("settings_config");
const me = {