mirror of https://github.com/zulip/zulip.git
tests: Remove unnecessary mocks of recent_view_util.
Since is_visible was refactored to use a variable, these mocks are not required. Also, since is_visible return `false` by default, mocking it to return false is not required.
This commit is contained in:
parent
c56f784489
commit
3cbfe6f31f
|
@ -44,9 +44,6 @@ const narrow_state = mock_esm("../src/narrow_state", {
|
|||
mock_esm("../src/reload_state", {
|
||||
is_in_progress: () => false,
|
||||
});
|
||||
mock_esm("../src/recent_view_util", {
|
||||
is_visible: noop,
|
||||
});
|
||||
mock_esm("../src/drafts", {
|
||||
update_draft: noop,
|
||||
});
|
||||
|
|
|
@ -7,9 +7,6 @@ const {mock_esm, set_global, zrequire} = require("./lib/namespace");
|
|||
const {run_test} = require("./lib/test");
|
||||
const $ = require("./lib/zjquery");
|
||||
|
||||
mock_esm("../src/recent_view_util", {
|
||||
is_visible: () => false,
|
||||
});
|
||||
const noop = () => {};
|
||||
// Mocking and stubbing things
|
||||
set_global("document", "document-stub");
|
||||
|
|
|
@ -63,7 +63,6 @@ message_lists.home = {view: {}};
|
|||
message_lists.all_rendered_message_lists = () => [message_lists.home, message_lists.current];
|
||||
|
||||
const message_store = zrequire("message_store");
|
||||
const recent_view_util = zrequire("recent_view_util");
|
||||
const stream_data = zrequire("stream_data");
|
||||
const unread = zrequire("unread");
|
||||
const unread_ops = zrequire("unread_ops");
|
||||
|
@ -92,9 +91,6 @@ run_test("unread_ops", ({override}) => {
|
|||
},
|
||||
];
|
||||
|
||||
// We don't want Recent Conversations to process message for this test.
|
||||
recent_view_util.set_visible(false);
|
||||
|
||||
// Make our test message appear to be unread, so that
|
||||
// we then need to subsequently process them as read.
|
||||
message_store.update_message_cache(test_messages[0]);
|
||||
|
|
|
@ -34,9 +34,6 @@ const stream_list = mock_esm("../src/stream_list");
|
|||
const left_sidebar_navigation_area = mock_esm("../src/left_sidebar_navigation_area");
|
||||
const typing_events = mock_esm("../src/typing_events");
|
||||
const unread_ops = mock_esm("../src/unread_ops");
|
||||
mock_esm("../src/recent_view_util", {
|
||||
is_visible() {},
|
||||
});
|
||||
mock_esm("../src/pm_list", {
|
||||
handle_narrow_activated() {},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue