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

@@ -7,10 +7,10 @@ const {run_test} = require("../zjsunit/test");
zrequire("unread");
zrequire("unread_ops");
zrequire("message_flags");
const message_flags = zrequire("message_flags");
set_global("ui", {});
set_global("channel", {});
const ui = set_global("ui", {});
const channel = set_global("channel", {});
set_global("starred_messages", {
add: () => {},
remove: () => {},