mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
js: Convert static/js/unread_ops.js to ES6 module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
7ec3fc38fa
commit
9997e13032
@@ -51,7 +51,7 @@ const narrow_state = {
|
||||
|
||||
rewiremock("../../static/js/narrow_state").with(narrow_state);
|
||||
|
||||
set_global("unread_ops", {
|
||||
rewiremock("../../static/js/unread_ops").with({
|
||||
notify_server_message_read: noop,
|
||||
});
|
||||
|
||||
|
||||
@@ -92,7 +92,8 @@ rewiremock("../../static/js/submessage").with(submessage);
|
||||
const typing_events = {__esModule: true};
|
||||
rewiremock("../../static/js/typing_events").with(typing_events);
|
||||
const ui = set_global("ui", {});
|
||||
const unread_ops = set_global("unread_ops", {});
|
||||
const unread_ops = {__esModule: true};
|
||||
rewiremock("../../static/js/unread_ops").with(unread_ops);
|
||||
const user_events = {__esModule: true};
|
||||
rewiremock("../../static/js/user_events").with(user_events);
|
||||
const user_groups = {__esModule: true};
|
||||
|
||||
@@ -15,7 +15,6 @@ rewiremock("../../static/js/starred_messages").with({
|
||||
rewiremock.enable();
|
||||
|
||||
zrequire("unread");
|
||||
zrequire("unread_ops");
|
||||
const message_flags = zrequire("message_flags");
|
||||
|
||||
const ui = set_global("ui", {});
|
||||
|
||||
@@ -43,7 +43,8 @@ const typing_events = {__esModule: true};
|
||||
rewiremock("../../static/js/typing_events").with(typing_events);
|
||||
const ui_util = {__esModule: true};
|
||||
rewiremock("../../static/js/ui_util").with(ui_util);
|
||||
const unread_ops = set_global("unread_ops", {});
|
||||
const unread_ops = {__esModule: true};
|
||||
rewiremock("../../static/js/unread_ops").with(unread_ops);
|
||||
rewiremock("../../static/js/recent_topics").with({
|
||||
hide: () => {},
|
||||
is_visible: () => {},
|
||||
|
||||
@@ -40,7 +40,8 @@ rewiremock("../../static/js/overlays").with(overlays);
|
||||
const resize = {__esModule: true};
|
||||
rewiremock("../../static/js/resize").with(resize);
|
||||
let stream_list = set_global("stream_list", {});
|
||||
let unread_ops = set_global("unread_ops", {});
|
||||
let unread_ops = {__esModule: true};
|
||||
rewiremock("../../static/js/unread_ops").with(unread_ops);
|
||||
const unread_ui = {__esModule: true};
|
||||
rewiremock("../../static/js/unread_ui").with(unread_ui);
|
||||
const channel = {__esModule: true};
|
||||
@@ -596,6 +597,7 @@ run_test("explore make_stub", (override) => {
|
||||
|
||||
*/
|
||||
|
||||
rewiremock("../../static/js/unread_ops").disable();
|
||||
unread_ops = zrequire("unread_ops");
|
||||
|
||||
run_test("unread_ops", (override) => {
|
||||
|
||||
Reference in New Issue
Block a user