Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
zjsunit: Deglobalize assert.
Anders Kaseorg7b03d48798a4
diff --git a/.eslintrc.json b/.eslintrc.jsonindex 4fc061010de..8b256ce3497 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -361,7 +361,6 @@{"files": ["frontend_tests/**"],"globals": {- "assert": false,"document": false,"reset_module": false,"set_global": false,diff --git a/frontend_tests/node_tests/activity.js b/frontend_tests/node_tests/activity.jsindex c2eaf806963..dd5dac640c2 100644--- a/frontend_tests/node_tests/activity.js+++ b/frontend_tests/node_tests/activity.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());const window_stub = $.create("window-stub");set_global("to_$", () => window_stub);diff --git a/frontend_tests/node_tests/alert_words.js b/frontend_tests/node_tests/alert_words.jsindex 698ef4e3eb7..c3f00f40883 100644--- a/frontend_tests/node_tests/alert_words.js+++ b/frontend_tests/node_tests/alert_words.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const params = {alert_words: ["alertone", "alerttwo", "alertthree", "al*rt.*s", ".+", "emoji"],};diff --git a/frontend_tests/node_tests/alert_words_ui.js b/frontend_tests/node_tests/alert_words_ui.jsindex 4f65657666d..3d7f9b305b0 100644--- a/frontend_tests/node_tests/alert_words_ui.js+++ b/frontend_tests/node_tests/alert_words_ui.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());set_global("channel", {});diff --git a/frontend_tests/node_tests/billing.js b/frontend_tests/node_tests/billing.jsindex 5dba519f680..a3c3de5db3f 100644--- a/frontend_tests/node_tests/billing.js+++ b/frontend_tests/node_tests/billing.js@@ -1,10 +1,11 @@"use strict";-const noop = () => {};+const {strict: assert} = require("assert");const fs = require("fs");const {JSDOM} = require("jsdom");+const noop = () => {};const template = fs.readFileSync("templates/corporate/billing.html", "utf-8");const dom = new JSDOM(template, {pretendToBeVisual: true});const document = dom.window.document;diff --git a/frontend_tests/node_tests/billing_helpers.js b/frontend_tests/node_tests/billing_helpers.jsindex 54ee1b43eb4..978435ef32d 100644--- a/frontend_tests/node_tests/billing_helpers.js+++ b/frontend_tests/node_tests/billing_helpers.js@@ -1,5 +1,6 @@"use strict";+const {strict: assert} = require("assert");const fs = require("fs");const JQuery = require("jquery");diff --git a/frontend_tests/node_tests/blueslip_stacktrace.js b/frontend_tests/node_tests/blueslip_stacktrace.jsindex fb997071109..a21d9e1c64c 100644--- a/frontend_tests/node_tests/blueslip_stacktrace.js+++ b/frontend_tests/node_tests/blueslip_stacktrace.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const blueslip_stacktrace = zrequire("blueslip_stacktrace");run_test("clean_path", () => {diff --git a/frontend_tests/node_tests/bot_data.js b/frontend_tests/node_tests/bot_data.jsindex 7ecab7d0f07..d4e594e20fd 100644--- a/frontend_tests/node_tests/bot_data.js+++ b/frontend_tests/node_tests/bot_data.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _settings_bots = {render_bots: () => {},};diff --git a/frontend_tests/node_tests/buddy_data.js b/frontend_tests/node_tests/buddy_data.jsindex d0ab500bb06..b36d751a05d 100644--- a/frontend_tests/node_tests/buddy_data.js+++ b/frontend_tests/node_tests/buddy_data.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");const _page_params = {};diff --git a/frontend_tests/node_tests/buddy_list.js b/frontend_tests/node_tests/buddy_list.jsindex a1232af8af3..bd71d7ef3f5 100644--- a/frontend_tests/node_tests/buddy_list.js+++ b/frontend_tests/node_tests/buddy_list.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/channel.js b/frontend_tests/node_tests/channel.jsindex 124b1ba14d7..6b87121305b 100644--- a/frontend_tests/node_tests/channel.js+++ b/frontend_tests/node_tests/channel.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");set_global("$", {});diff --git a/frontend_tests/node_tests/color_data.js b/frontend_tests/node_tests/color_data.jsindex b09974b90b0..dce99ec987d 100644--- a/frontend_tests/node_tests/color_data.js+++ b/frontend_tests/node_tests/color_data.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("color_data");run_test("pick_color", () => {diff --git a/frontend_tests/node_tests/colorspace.js b/frontend_tests/node_tests/colorspace.jsindex cbc423ce478..1eccb53e128 100644--- a/frontend_tests/node_tests/colorspace.js+++ b/frontend_tests/node_tests/colorspace.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("colorspace");run_test("sRGB_to_linear", () => {diff --git a/frontend_tests/node_tests/common.js b/frontend_tests/node_tests/common.jsindex f2dfa1343f8..2cdc1cf2567 100644--- a/frontend_tests/node_tests/common.js+++ b/frontend_tests/node_tests/common.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const noop = () => {};set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/components.js b/frontend_tests/node_tests/components.jsindex 081ff02fa59..81299fda1b0 100644--- a/frontend_tests/node_tests/components.js+++ b/frontend_tests/node_tests/components.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");zrequire("keydown_util");diff --git a/frontend_tests/node_tests/compose.js b/frontend_tests/node_tests/compose.jsindex d37fd0026a6..f438f4d68d4 100644--- a/frontend_tests/node_tests/compose.js+++ b/frontend_tests/node_tests/compose.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const {JSDOM} = require("jsdom");const rewiremock = require("rewiremock/node");diff --git a/frontend_tests/node_tests/compose_actions.js b/frontend_tests/node_tests/compose_actions.jsindex f9b7611089d..8007f662975 100644--- a/frontend_tests/node_tests/compose_actions.js+++ b/frontend_tests/node_tests/compose_actions.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const noop = function () {};const return_false = function () {return false;diff --git a/frontend_tests/node_tests/compose_fade.js b/frontend_tests/node_tests/compose_fade.jsindex cb2039508c5..3198ae15b55 100644--- a/frontend_tests/node_tests/compose_fade.js+++ b/frontend_tests/node_tests/compose_fade.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("stream_data");const people = zrequire("people");zrequire("compose_fade");diff --git a/frontend_tests/node_tests/compose_pm_pill.js b/frontend_tests/node_tests/compose_pm_pill.jsindex 95f6a2f6119..9fb7e374375 100644--- a/frontend_tests/node_tests/compose_pm_pill.js+++ b/frontend_tests/node_tests/compose_pm_pill.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());const people = zrequire("people");diff --git a/frontend_tests/node_tests/compose_ui.js b/frontend_tests/node_tests/compose_ui.jsindex 97541e40024..cd3ce813d0c 100644--- a/frontend_tests/node_tests/compose_ui.js+++ b/frontend_tests/node_tests/compose_ui.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const autosize = require("autosize");zrequire("compose_ui");diff --git a/frontend_tests/node_tests/composebox_typeahead.js b/frontend_tests/node_tests/composebox_typeahead.jsindex b5be5ba9e61..7711a124a09 100644--- a/frontend_tests/node_tests/composebox_typeahead.js+++ b/frontend_tests/node_tests/composebox_typeahead.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const emoji = zrequire("emoji", "shared/js/emoji");const typeahead = zrequire("typeahead", "shared/js/typeahead");zrequire("compose_state");diff --git a/frontend_tests/node_tests/copy_and_paste.js b/frontend_tests/node_tests/copy_and_paste.jsindex 1cb65caeb77..a5efdab187d 100644--- a/frontend_tests/node_tests/copy_and_paste.js+++ b/frontend_tests/node_tests/copy_and_paste.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+global.stub_out_jquery();set_global("page_params", {diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.jsindex 11630949053..80d4db25c49 100644--- a/frontend_tests/node_tests/dispatch.js+++ b/frontend_tests/node_tests/dispatch.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const noop = function () {};const events = require("./lib/events");diff --git a/frontend_tests/node_tests/dispatch_subs.js b/frontend_tests/node_tests/dispatch_subs.jsindex 5c439afcfee..b7df0b384f4 100644--- a/frontend_tests/node_tests/dispatch_subs.js+++ b/frontend_tests/node_tests/dispatch_subs.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const events = require("./lib/events");const event_fixtures = events.fixtures;diff --git a/frontend_tests/node_tests/drafts.js b/frontend_tests/node_tests/drafts.jsindex fd86d4f06ba..3166e979fc0 100644--- a/frontend_tests/node_tests/drafts.js+++ b/frontend_tests/node_tests/drafts.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const XDate = require("xdate");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/dropdown_list_widget.js b/frontend_tests/node_tests/dropdown_list_widget.jsindex 21d033299bd..91022c0c009 100644--- a/frontend_tests/node_tests/dropdown_list_widget.js+++ b/frontend_tests/node_tests/dropdown_list_widget.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("dropdown_list_widget");zrequire("scroll_util");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/echo.js b/frontend_tests/node_tests/echo.jsindex c6feae67589..0df5ef86105 100644--- a/frontend_tests/node_tests/echo.js+++ b/frontend_tests/node_tests/echo.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());set_global("markdown", {});set_global("local_message", {diff --git a/frontend_tests/node_tests/emoji.js b/frontend_tests/node_tests/emoji.jsindex 55ae29baae2..81a37dc0301 100644--- a/frontend_tests/node_tests/emoji.js+++ b/frontend_tests/node_tests/emoji.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const emoji_codes = zrequire("emoji_codes", "generated/emoji/emoji_codes.json");const events = require("./lib/events");diff --git a/frontend_tests/node_tests/emoji_picker.js b/frontend_tests/node_tests/emoji_picker.jsindex f30c1a5b654..2c2c79a3a6d 100644--- a/frontend_tests/node_tests/emoji_picker.js+++ b/frontend_tests/node_tests/emoji_picker.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");const emoji = zrequire("emoji", "shared/js/emoji");diff --git a/frontend_tests/node_tests/fenced_code.js b/frontend_tests/node_tests/fenced_code.jsindex 5d90ab2369f..50c18d3f852 100644--- a/frontend_tests/node_tests/fenced_code.js+++ b/frontend_tests/node_tests/fenced_code.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const fenced_code = zrequire("fenced_code", "shared/js/fenced_code");run_test("get_unused_fence", () => {diff --git a/frontend_tests/node_tests/fetch_status.js b/frontend_tests/node_tests/fetch_status.jsindex 3ae0437b705..5c5eb02c227 100644--- a/frontend_tests/node_tests/fetch_status.js+++ b/frontend_tests/node_tests/fetch_status.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const FetchStatus = zrequire("fetch_status");set_global("message_scroll", {hide_loading_older: () => {},diff --git a/frontend_tests/node_tests/filter.js b/frontend_tests/node_tests/filter.jsindex 2cc26ce6234..73be82a8775 100644--- a/frontend_tests/node_tests/filter.js+++ b/frontend_tests/node_tests/filter.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("unread");zrequire("stream_data");const people = zrequire("people");diff --git a/frontend_tests/node_tests/fold_dict.js b/frontend_tests/node_tests/fold_dict.jsindex 493c3107128..24fb5d18849 100644--- a/frontend_tests/node_tests/fold_dict.js+++ b/frontend_tests/node_tests/fold_dict.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const {FoldDict} = zrequire("fold_dict");run_test("basic", () => {diff --git a/frontend_tests/node_tests/general.js b/frontend_tests/node_tests/general.jsindex 7d3f6ad3675..39d9425913e 100644--- a/frontend_tests/node_tests/general.js+++ b/frontend_tests/node_tests/general.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+// This is a general tour of how to write node tests that// may also give you some quick insight on how the Zulip// browser app is constructed. Let's start with testingdiff --git a/frontend_tests/node_tests/hash_util.js b/frontend_tests/node_tests/hash_util.jsindex 97c82ca5768..217790b2d38 100644--- a/frontend_tests/node_tests/hash_util.js+++ b/frontend_tests/node_tests/hash_util.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("hash_util");zrequire("stream_data");const people = zrequire("people");diff --git a/frontend_tests/node_tests/hashchange.js b/frontend_tests/node_tests/hashchange.jsindex c713a433f68..52ee398e44e 100644--- a/frontend_tests/node_tests/hashchange.js+++ b/frontend_tests/node_tests/hashchange.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());const window_stub = $.create("window-stub");set_global("location", {diff --git a/frontend_tests/node_tests/hotkey.js b/frontend_tests/node_tests/hotkey.jsindex 8768baf23dd..3293489661d 100644--- a/frontend_tests/node_tests/hotkey.js+++ b/frontend_tests/node_tests/hotkey.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+// Important note on these tests://// The way the Zulip hotkey tests work is as follows. First, we setdiff --git a/frontend_tests/node_tests/i18n.js b/frontend_tests/node_tests/i18n.jsindex 5a608980288..ee5762e18cb 100644--- a/frontend_tests/node_tests/i18n.js+++ b/frontend_tests/node_tests/i18n.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("templates");// We download our translations in `page_params` (whichdiff --git a/frontend_tests/node_tests/input_pill.js b/frontend_tests/node_tests/input_pill.jsindex 3409a720c72..90c3922f3ae 100644--- a/frontend_tests/node_tests/input_pill.js+++ b/frontend_tests/node_tests/input_pill.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());zrequire("input_pill");diff --git a/frontend_tests/node_tests/lazy_set.js b/frontend_tests/node_tests/lazy_set.jsindex c1caba4d051..f33508e769f 100644--- a/frontend_tests/node_tests/lazy_set.js+++ b/frontend_tests/node_tests/lazy_set.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const {LazySet} = zrequire("lazy_set");/*diff --git a/frontend_tests/node_tests/lightbox.js b/frontend_tests/node_tests/lightbox.jsindex e89251fbf5a..508aa02f98b 100644--- a/frontend_tests/node_tests/lightbox.js+++ b/frontend_tests/node_tests/lightbox.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("rows");zrequire("lightbox");diff --git a/frontend_tests/node_tests/list_cursor.js b/frontend_tests/node_tests/list_cursor.jsindex d3ce3922c70..ec006d8d169 100644--- a/frontend_tests/node_tests/list_cursor.js+++ b/frontend_tests/node_tests/list_cursor.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("list_cursor");run_test("config errors", () => {diff --git a/frontend_tests/node_tests/list_render.js b/frontend_tests/node_tests/list_render.jsindex 384150030f6..2dcd5ee6f15 100644--- a/frontend_tests/node_tests/list_render.js+++ b/frontend_tests/node_tests/list_render.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("list_render");// We need these stubs to get by instanceof checks.diff --git a/frontend_tests/node_tests/markdown.js b/frontend_tests/node_tests/markdown.jsindex 5eb530293b0..f2f2ec1acb6 100644--- a/frontend_tests/node_tests/markdown.js+++ b/frontend_tests/node_tests/markdown.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("hash_util");const emoji = zrequire("emoji", "shared/js/emoji");diff --git a/frontend_tests/node_tests/message_edit.js b/frontend_tests/node_tests/message_edit.jsindex be132278ff2..775389586b4 100644--- a/frontend_tests/node_tests/message_edit.js+++ b/frontend_tests/node_tests/message_edit.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("document", null);set_global("page_params", {realm_community_topic_editing_limit_seconds: 86400,diff --git a/frontend_tests/node_tests/message_events.js b/frontend_tests/node_tests/message_events.jsindex a53161b8d3c..a30885de7c2 100644--- a/frontend_tests/node_tests/message_events.js+++ b/frontend_tests/node_tests/message_events.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("message_events");zrequire("message_store");zrequire("muting");diff --git a/frontend_tests/node_tests/message_fetch.js b/frontend_tests/node_tests/message_fetch.jsindex 92f0ea6f82c..690cae239ae 100644--- a/frontend_tests/node_tests/message_fetch.js+++ b/frontend_tests/node_tests/message_fetch.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/message_flags.js b/frontend_tests/node_tests/message_flags.jsindex aa15926c94f..18087079fad 100644--- a/frontend_tests/node_tests/message_flags.js+++ b/frontend_tests/node_tests/message_flags.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("unread");zrequire("unread_ops");zrequire("message_flags");diff --git a/frontend_tests/node_tests/message_list.js b/frontend_tests/node_tests/message_list.jsindex 14beb57898c..75a21a98abf 100644--- a/frontend_tests/node_tests/message_list.js+++ b/frontend_tests/node_tests/message_list.js@@ -1,5 +1,6 @@"use strict";+const {strict: assert} = require("assert");// These unit tests for static/js/message_list.js emphasize the model-ish// aspects of the MessageList class. We have to stub out a few functions// related to views and events to get the tests working.diff --git a/frontend_tests/node_tests/message_list_data.js b/frontend_tests/node_tests/message_list_data.jsindex 5a10682dfe5..874e8c130f6 100644--- a/frontend_tests/node_tests/message_list_data.js+++ b/frontend_tests/node_tests/message_list_data.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("unread");zrequire("Filter", "js/filter");diff --git a/frontend_tests/node_tests/message_list_view.js b/frontend_tests/node_tests/message_list_view.jsindex 90d96df3661..b2cb0725789 100644--- a/frontend_tests/node_tests/message_list_view.js+++ b/frontend_tests/node_tests/message_list_view.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/message_store.js b/frontend_tests/node_tests/message_store.jsindex e948bb704ab..87a93bd9852 100644--- a/frontend_tests/node_tests/message_store.js+++ b/frontend_tests/node_tests/message_store.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const util = zrequire("util");zrequire("pm_conversations");const people = zrequire("people");diff --git a/frontend_tests/node_tests/muting.js b/frontend_tests/node_tests/muting.jsindex 0a0b0ace356..b9ceab6da81 100644--- a/frontend_tests/node_tests/muting.js+++ b/frontend_tests/node_tests/muting.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("timerender");zrequire("muting");zrequire("stream_data");diff --git a/frontend_tests/node_tests/narrow.js b/frontend_tests/node_tests/narrow.jsindex ee8856d0210..887f16662e4 100644--- a/frontend_tests/node_tests/narrow.js+++ b/frontend_tests/node_tests/narrow.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());zrequire("hash_util");zrequire("hashchange");diff --git a/frontend_tests/node_tests/narrow_activate.js b/frontend_tests/node_tests/narrow_activate.jsindex c958e5434dd..17b8bcc82c7 100644--- a/frontend_tests/node_tests/narrow_activate.js+++ b/frontend_tests/node_tests/narrow_activate.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const util = zrequire("util");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/narrow_local.js b/frontend_tests/node_tests/narrow_local.jsindex 8194b84354f..3833b0c8e2f 100644--- a/frontend_tests/node_tests/narrow_local.js+++ b/frontend_tests/node_tests/narrow_local.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("Filter", "js/filter");zrequire("FetchStatus", "js/fetch_status");zrequire("MessageListData", "js/message_list_data");diff --git a/frontend_tests/node_tests/narrow_state.js b/frontend_tests/node_tests/narrow_state.jsindex a6928204e0a..fce2426b8b8 100644--- a/frontend_tests/node_tests/narrow_state.js+++ b/frontend_tests/node_tests/narrow_state.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const people = zrequire("people");zrequire("Filter", "js/filter");zrequire("stream_data");diff --git a/frontend_tests/node_tests/narrow_unread.js b/frontend_tests/node_tests/narrow_unread.jsindex 3131e2ed93e..c7dae7ed77d 100644--- a/frontend_tests/node_tests/narrow_unread.js+++ b/frontend_tests/node_tests/narrow_unread.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("Filter", "js/filter");const people = zrequire("people");zrequire("stream_data");diff --git a/frontend_tests/node_tests/notifications.js b/frontend_tests/node_tests/notifications.jsindex e91f5c207d7..cf08b473ea8 100644--- a/frontend_tests/node_tests/notifications.js+++ b/frontend_tests/node_tests/notifications.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const rewiremock = require("rewiremock/node");// Dependenciesdiff --git a/frontend_tests/node_tests/password.js b/frontend_tests/node_tests/password.jsindex 745f0df0bba..9cd8d9177d5 100644--- a/frontend_tests/node_tests/password.js+++ b/frontend_tests/node_tests/password.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("zxcvbn", zrequire("zxcvbn", "zxcvbn"));zrequire("common");diff --git a/frontend_tests/node_tests/people.js b/frontend_tests/node_tests/people.jsindex 9c8ad4935f4..e10ed322928 100644--- a/frontend_tests/node_tests/people.js+++ b/frontend_tests/node_tests/people.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");const moment = require("moment-timezone");const rewiremock = require("rewiremock/node");diff --git a/frontend_tests/node_tests/people_errors.js b/frontend_tests/node_tests/people_errors.jsindex b4e12019f32..370238a68de 100644--- a/frontend_tests/node_tests/people_errors.js+++ b/frontend_tests/node_tests/people_errors.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const people = zrequire("people");const return_false = function () {diff --git a/frontend_tests/node_tests/pm_conversations.js b/frontend_tests/node_tests/pm_conversations.jsindex b9b8a377dcb..52849a54836 100644--- a/frontend_tests/node_tests/pm_conversations.js+++ b/frontend_tests/node_tests/pm_conversations.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const pmc = zrequire("pm_conversations");run_test("partners", () => {diff --git a/frontend_tests/node_tests/pm_list.js b/frontend_tests/node_tests/pm_list.jsindex e0108114af7..ec02a4d6298 100644--- a/frontend_tests/node_tests/pm_list.js+++ b/frontend_tests/node_tests/pm_list.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());set_global("narrow_state", {});diff --git a/frontend_tests/node_tests/poll_widget.js b/frontend_tests/node_tests/poll_widget.jsindex 8f0c10e077d..ff11a0f551f 100644--- a/frontend_tests/node_tests/poll_widget.js+++ b/frontend_tests/node_tests/poll_widget.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("poll_widget");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/popovers.js b/frontend_tests/node_tests/popovers.jsindex 34649b1036e..dec862f8f1b 100644--- a/frontend_tests/node_tests/popovers.js+++ b/frontend_tests/node_tests/popovers.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const rewiremock = require("rewiremock/node");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/presence.js b/frontend_tests/node_tests/presence.jsindex 1c371f69d16..38c92562cf9 100644--- a/frontend_tests/node_tests/presence.js+++ b/frontend_tests/node_tests/presence.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const XDate = require("xdate");const people = zrequire("people");diff --git a/frontend_tests/node_tests/reactions.js b/frontend_tests/node_tests/reactions.jsindex fd96260aa88..32a42953c1a 100644--- a/frontend_tests/node_tests/reactions.js+++ b/frontend_tests/node_tests/reactions.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("document", "document-stub");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/recent_senders.js b/frontend_tests/node_tests/recent_senders.jsindex b5dd2fc1578..ca22bbaee18 100644--- a/frontend_tests/node_tests/recent_senders.js+++ b/frontend_tests/node_tests/recent_senders.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const rs = zrequire("recent_senders");let next_id = 0;diff --git a/frontend_tests/node_tests/recent_topics.js b/frontend_tests/node_tests/recent_topics.jsindex 9188a37592f..b59e9e765d9 100644--- a/frontend_tests/node_tests/recent_topics.js+++ b/frontend_tests/node_tests/recent_topics.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("message_util");const noop = () => {};diff --git a/frontend_tests/node_tests/rendered_markdown.js b/frontend_tests/node_tests/rendered_markdown.jsindex 7ef9d3f72e3..d71111b1969 100644--- a/frontend_tests/node_tests/rendered_markdown.js+++ b/frontend_tests/node_tests/rendered_markdown.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const rm = zrequire("rendered_markdown");const people = zrequire("people");zrequire("user_groups");diff --git a/frontend_tests/node_tests/rtl.js b/frontend_tests/node_tests/rtl.jsindex 1c758c83bb1..79bf8d478db 100644--- a/frontend_tests/node_tests/rtl.js+++ b/frontend_tests/node_tests/rtl.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const rtl = zrequire("rtl");run_test("get_direction", () => {diff --git a/frontend_tests/node_tests/schema.js b/frontend_tests/node_tests/schema.jsindex 2d620047c33..c77c4a7f955 100644--- a/frontend_tests/node_tests/schema.js+++ b/frontend_tests/node_tests/schema.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("schema");run_test("basics", () => {diff --git a/frontend_tests/node_tests/scroll_util.js b/frontend_tests/node_tests/scroll_util.jsindex a07f1100592..0e6dc9ad882 100644--- a/frontend_tests/node_tests/scroll_util.js+++ b/frontend_tests/node_tests/scroll_util.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("scroll_util");set_global("ui", {get_scroll_element: (element) => element,diff --git a/frontend_tests/node_tests/search.js b/frontend_tests/node_tests/search.jsindex 506822f4917..d599631dbad 100644--- a/frontend_tests/node_tests/search.js+++ b/frontend_tests/node_tests/search.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("page_params", {search_pills_enabled: true,});diff --git a/frontend_tests/node_tests/search_legacy.js b/frontend_tests/node_tests/search_legacy.jsindex 2a2c06c415c..b334d9f94c5 100644--- a/frontend_tests/node_tests/search_legacy.js+++ b/frontend_tests/node_tests/search_legacy.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("page_params", {search_pills_enabled: false,});diff --git a/frontend_tests/node_tests/search_pill.js b/frontend_tests/node_tests/search_pill.jsindex c588f3e4ab3..2eaeef70884 100644--- a/frontend_tests/node_tests/search_pill.js+++ b/frontend_tests/node_tests/search_pill.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("search_pill");zrequire("input_pill");zrequire("Filter", "js/filter");diff --git a/frontend_tests/node_tests/search_suggestion.js b/frontend_tests/node_tests/search_suggestion.jsindex 47c0cce59f3..75353603293 100644--- a/frontend_tests/node_tests/search_suggestion.js+++ b/frontend_tests/node_tests/search_suggestion.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("page_params", {search_pills_enabled: true,});diff --git a/frontend_tests/node_tests/search_suggestion_legacy.js b/frontend_tests/node_tests/search_suggestion_legacy.jsindex 3b0020541e2..e9eeb717b2c 100644--- a/frontend_tests/node_tests/search_suggestion_legacy.js+++ b/frontend_tests/node_tests/search_suggestion_legacy.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("page_params", {search_pills_enabled: false,});diff --git a/frontend_tests/node_tests/server_events.js b/frontend_tests/node_tests/server_events.jsindex 8c88c233691..376afcadb8c 100644--- a/frontend_tests/node_tests/server_events.js+++ b/frontend_tests/node_tests/server_events.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const noop = function () {};set_global("document", {});diff --git a/frontend_tests/node_tests/settings_bots.js b/frontend_tests/node_tests/settings_bots.jsindex 196dcf11430..a00deeef6a6 100644--- a/frontend_tests/node_tests/settings_bots.js+++ b/frontend_tests/node_tests/settings_bots.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const rewiremock = require("rewiremock/node");set_global("page_params", {diff --git a/frontend_tests/node_tests/settings_data.js b/frontend_tests/node_tests/settings_data.jsindex 9261e114246..35587172dfe 100644--- a/frontend_tests/node_tests/settings_data.js+++ b/frontend_tests/node_tests/settings_data.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const settings_data = zrequire("settings_data");const settings_config = zrequire("settings_config");diff --git a/frontend_tests/node_tests/settings_emoji.js b/frontend_tests/node_tests/settings_emoji.jsindex 743a4f78489..9cc9d08dd4e 100644--- a/frontend_tests/node_tests/settings_emoji.js+++ b/frontend_tests/node_tests/settings_emoji.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());set_global("upload_widget", {});zrequire("settings_emoji");diff --git a/frontend_tests/node_tests/settings_muting.js b/frontend_tests/node_tests/settings_muting.jsindex f80de132432..512341f7a62 100644--- a/frontend_tests/node_tests/settings_muting.js+++ b/frontend_tests/node_tests/settings_muting.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());set_global("XDate", zrequire("XDate", "xdate"));diff --git a/frontend_tests/node_tests/settings_org.js b/frontend_tests/node_tests/settings_org.jsindex a14021230cf..1d34dfa595d 100644--- a/frontend_tests/node_tests/settings_org.js+++ b/frontend_tests/node_tests/settings_org.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const rewiremock = require("rewiremock/node");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/settings_profile_fields.js b/frontend_tests/node_tests/settings_profile_fields.jsindex e818ca94196..20de9b07bc1 100644--- a/frontend_tests/node_tests/settings_profile_fields.js+++ b/frontend_tests/node_tests/settings_profile_fields.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const rewiremock = require("rewiremock/node");set_global("page_params", {});diff --git a/frontend_tests/node_tests/settings_user_groups.js b/frontend_tests/node_tests/settings_user_groups.jsindex fa92a7f5aa3..eceda65c767 100644--- a/frontend_tests/node_tests/settings_user_groups.js+++ b/frontend_tests/node_tests/settings_user_groups.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");zrequire("user_pill");diff --git a/frontend_tests/node_tests/spoilers.js b/frontend_tests/node_tests/spoilers.jsindex 81b48f6ebdb..92aa26a8057 100644--- a/frontend_tests/node_tests/spoilers.js+++ b/frontend_tests/node_tests/spoilers.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());zrequire("spoilers");diff --git a/frontend_tests/node_tests/stream_data.js b/frontend_tests/node_tests/stream_data.jsindex 15681ecdf95..e3e7ba1e8cf 100644--- a/frontend_tests/node_tests/stream_data.js+++ b/frontend_tests/node_tests/stream_data.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");set_global("page_params", {diff --git a/frontend_tests/node_tests/stream_edit.js b/frontend_tests/node_tests/stream_edit.jsindex 9465cccc743..b965f04f904 100644--- a/frontend_tests/node_tests/stream_edit.js+++ b/frontend_tests/node_tests/stream_edit.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const {LazySet} = zrequire("lazy_set");const noop = () => {};diff --git a/frontend_tests/node_tests/stream_events.js b/frontend_tests/node_tests/stream_events.jsindex a096a1c1675..af853fc734a 100644--- a/frontend_tests/node_tests/stream_events.js+++ b/frontend_tests/node_tests/stream_events.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const noop = function () {};const return_true = function () {return true;diff --git a/frontend_tests/node_tests/stream_list.js b/frontend_tests/node_tests/stream_list.jsindex 92382e04700..de2b5ccf2cf 100644--- a/frontend_tests/node_tests/stream_list.js+++ b/frontend_tests/node_tests/stream_list.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("document", "document-stub");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/stream_pill.js b/frontend_tests/node_tests/stream_pill.jsindex ba8c489983f..0b103981beb 100644--- a/frontend_tests/node_tests/stream_pill.js+++ b/frontend_tests/node_tests/stream_pill.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("stream_data");zrequire("stream_pill");diff --git a/frontend_tests/node_tests/stream_search.js b/frontend_tests/node_tests/stream_search.jsindex fbe49d960a1..51a1bb3a78c 100644--- a/frontend_tests/node_tests/stream_search.js+++ b/frontend_tests/node_tests/stream_search.js@@ -1,5 +1,6 @@"use strict";+const {strict: assert} = require("assert");// This tests the stream searching functionality which currently// lives in stream_list.js.diff --git a/frontend_tests/node_tests/stream_sort.js b/frontend_tests/node_tests/stream_sort.jsindex bba41a1a22b..41e001589f7 100644--- a/frontend_tests/node_tests/stream_sort.js+++ b/frontend_tests/node_tests/stream_sort.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("stream_data");zrequire("stream_sort");diff --git a/frontend_tests/node_tests/stream_topic_history.js b/frontend_tests/node_tests/stream_topic_history.jsindex ddbbcb17a95..ba8a694c5b9 100644--- a/frontend_tests/node_tests/stream_topic_history.js+++ b/frontend_tests/node_tests/stream_topic_history.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("unread");zrequire("stream_data");zrequire("stream_topic_history");diff --git a/frontend_tests/node_tests/submessage.js b/frontend_tests/node_tests/submessage.jsindex fa26f88eb73..973eabc5378 100644--- a/frontend_tests/node_tests/submessage.js+++ b/frontend_tests/node_tests/submessage.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("submessage");set_global("channel", {});diff --git a/frontend_tests/node_tests/subs.js b/frontend_tests/node_tests/subs.jsindex 483903dfc0d..a5e614d00e2 100644--- a/frontend_tests/node_tests/subs.js+++ b/frontend_tests/node_tests/subs.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+global.stub_out_jquery();set_global("ui", {diff --git a/frontend_tests/node_tests/support.js b/frontend_tests/node_tests/support.jsindex b81acc4ffb2..7584e47f25f 100644--- a/frontend_tests/node_tests/support.js+++ b/frontend_tests/node_tests/support.js@@ -1,5 +1,6 @@"use strict";+const {strict: assert} = require("assert");const fs = require("fs");const {JSDOM} = require("jsdom");diff --git a/frontend_tests/node_tests/timerender.js b/frontend_tests/node_tests/timerender.jsindex 9864393396e..dc3e0804335 100644--- a/frontend_tests/node_tests/timerender.js+++ b/frontend_tests/node_tests/timerender.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const moment = require("moment");const XDate = require("xdate");diff --git a/frontend_tests/node_tests/top_left_corner.js b/frontend_tests/node_tests/top_left_corner.jsindex b1d1480a60f..6fd6827dd45 100644--- a/frontend_tests/node_tests/top_left_corner.js+++ b/frontend_tests/node_tests/top_left_corner.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());zrequire("Filter", "js/filter");diff --git a/frontend_tests/node_tests/topic_generator.js b/frontend_tests/node_tests/topic_generator.jsindex 8ca1c2fbae1..f646ea6d2ac 100644--- a/frontend_tests/node_tests/topic_generator.js+++ b/frontend_tests/node_tests/topic_generator.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const pm_conversations = zrequire("pm_conversations");pm_conversations.recent = {};diff --git a/frontend_tests/node_tests/topic_list_data.js b/frontend_tests/node_tests/topic_list_data.jsindex d3f3ad10603..3730dc5b143 100644--- a/frontend_tests/node_tests/topic_list_data.js+++ b/frontend_tests/node_tests/topic_list_data.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");set_global("narrow_state", {});diff --git a/frontend_tests/node_tests/transmit.js b/frontend_tests/node_tests/transmit.jsindex 1593fb8a2ef..37baa5c7ead 100644--- a/frontend_tests/node_tests/transmit.js+++ b/frontend_tests/node_tests/transmit.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const noop = function () {};set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/typeahead.js b/frontend_tests/node_tests/typeahead.jsindex d1f11005739..51fadcf921c 100644--- a/frontend_tests/node_tests/typeahead.js+++ b/frontend_tests/node_tests/typeahead.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const typeahead = zrequire("typeahead", "shared/js/typeahead");// The data structures here may be different fordiff --git a/frontend_tests/node_tests/typeahead_helper.js b/frontend_tests/node_tests/typeahead_helper.jsindex 43b0dbf7cb0..a7ca2414f36 100644--- a/frontend_tests/node_tests/typeahead_helper.js+++ b/frontend_tests/node_tests/typeahead_helper.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("page_params", {realm_is_zephyr_mirror_realm: false});set_global("md5", (s) => "md5-" + s);diff --git a/frontend_tests/node_tests/typing_data.js b/frontend_tests/node_tests/typing_data.jsindex d1f2b8a7686..82f1daec43d 100644--- a/frontend_tests/node_tests/typing_data.js+++ b/frontend_tests/node_tests/typing_data.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("typing_data");run_test("basics", () => {diff --git a/frontend_tests/node_tests/typing_status.js b/frontend_tests/node_tests/typing_status.jsindex ffcda32a553..b8bd5abf144 100644--- a/frontend_tests/node_tests/typing_status.js+++ b/frontend_tests/node_tests/typing_status.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("typing");zrequire("people");zrequire("compose_pm_pill");diff --git a/frontend_tests/node_tests/ui.js b/frontend_tests/node_tests/ui.jsindex 8ed2e3eb26b..e0efa634b4a 100644--- a/frontend_tests/node_tests/ui.js+++ b/frontend_tests/node_tests/ui.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const ui = zrequire("ui");set_global("navigator", {diff --git a/frontend_tests/node_tests/unread.js b/frontend_tests/node_tests/unread.jsindex db28811b915..0559a7b17dd 100644--- a/frontend_tests/node_tests/unread.js+++ b/frontend_tests/node_tests/unread.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const _ = require("lodash");zrequire("muting");diff --git a/frontend_tests/node_tests/upgrade.js b/frontend_tests/node_tests/upgrade.jsindex 7aa4be0d24e..44c69d9bafa 100644--- a/frontend_tests/node_tests/upgrade.js+++ b/frontend_tests/node_tests/upgrade.js@@ -1,10 +1,11 @@"use strict";-const noop = () => {};+const {strict: assert} = require("assert");const fs = require("fs");const {JSDOM} = require("jsdom");+const noop = () => {};const template = fs.readFileSync("templates/corporate/upgrade.html", "utf-8");const dom = new JSDOM(template, {pretendToBeVisual: true});const document = dom.window.document;diff --git a/frontend_tests/node_tests/upload.js b/frontend_tests/node_tests/upload.jsindex 5370c554b86..fb887827a3c 100644--- a/frontend_tests/node_tests/upload.js+++ b/frontend_tests/node_tests/upload.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const rewiremock = require("rewiremock/node");set_global("$", global.make_zjquery());diff --git a/frontend_tests/node_tests/user_events.js b/frontend_tests/node_tests/user_events.jsindex fc326e37b63..61c232c1fbb 100644--- a/frontend_tests/node_tests/user_events.js+++ b/frontend_tests/node_tests/user_events.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());const people = zrequire("people");diff --git a/frontend_tests/node_tests/user_groups.js b/frontend_tests/node_tests/user_groups.jsindex 3a7a47dbd4d..888cff15163 100644--- a/frontend_tests/node_tests/user_groups.js+++ b/frontend_tests/node_tests/user_groups.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("user_groups");run_test("user_groups", () => {diff --git a/frontend_tests/node_tests/user_pill.js b/frontend_tests/node_tests/user_pill.jsindex 1c628a5f0ac..6388a36d224 100644--- a/frontend_tests/node_tests/user_pill.js+++ b/frontend_tests/node_tests/user_pill.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const people = zrequire("people");set_global("md5", (s) => "md5-" + s);zrequire("user_pill");diff --git a/frontend_tests/node_tests/user_status.js b/frontend_tests/node_tests/user_status.jsindex 434d99b2051..2bf9c7a003f 100644--- a/frontend_tests/node_tests/user_status.js+++ b/frontend_tests/node_tests/user_status.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("channel", {});zrequire("user_status");diff --git a/frontend_tests/node_tests/util.js b/frontend_tests/node_tests/util.jsindex f0f57b875c7..23130b9fb40 100644--- a/frontend_tests/node_tests/util.js+++ b/frontend_tests/node_tests/util.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const {JSDOM} = require("jsdom");const _ = require("lodash");diff --git a/frontend_tests/node_tests/vdom.js b/frontend_tests/node_tests/vdom.jsindex 0ca5b50494a..4e2b9a5d476 100644--- a/frontend_tests/node_tests/vdom.js+++ b/frontend_tests/node_tests/vdom.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+zrequire("vdom");run_test("basics", () => {diff --git a/frontend_tests/node_tests/widgetize.js b/frontend_tests/node_tests/widgetize.jsindex aa40cb0695c..1ec8d7261f9 100644--- a/frontend_tests/node_tests/widgetize.js+++ b/frontend_tests/node_tests/widgetize.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+set_global("$", global.make_zjquery());set_global("poll_widget", {});set_global("todo_widget", {});diff --git a/frontend_tests/node_tests/zblueslip.js b/frontend_tests/node_tests/zblueslip.jsindex 10373f88392..e7a1963f928 100644--- a/frontend_tests/node_tests/zblueslip.js+++ b/frontend_tests/node_tests/zblueslip.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+/*This test module actually tests our test code, particularly zblueslip, anddiff --git a/frontend_tests/node_tests/zjquery.js b/frontend_tests/node_tests/zjquery.jsindex 0a2184316b6..0b45e211b29 100644--- a/frontend_tests/node_tests/zjquery.js+++ b/frontend_tests/node_tests/zjquery.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+/*This test module actually tests our test code, particularly zjquery, anddiff --git a/frontend_tests/zjsunit/index.js b/frontend_tests/zjsunit/index.jsindex f005abb9b29..bfd6b50e8d3 100644--- a/frontend_tests/zjsunit/index.js+++ b/frontend_tests/zjsunit/index.js@@ -25,8 +25,6 @@ require("@babel/register")({plugins: ["rewire-ts"],});-global.assert = require("assert").strict;-// Create a helper function to avoid sneaky delays in tests.function immediate(f) {return () => f();diff --git a/frontend_tests/zjsunit/markdown_assert.js b/frontend_tests/zjsunit/markdown_assert.jsindex 75c5afb4234..49566cbd7f4 100644--- a/frontend_tests/zjsunit/markdown_assert.js+++ b/frontend_tests/zjsunit/markdown_assert.js@@ -22,6 +22,8 @@* HTML. This makes it easier to spot relevant differences.*/+const {strict: assert} = require("assert");+const {JSDOM} = require("jsdom");const _ = require("lodash");diff --git a/frontend_tests/zjsunit/zjquery.js b/frontend_tests/zjsunit/zjquery.jsindex 8e4945473ef..03b17f01a44 100644--- a/frontend_tests/zjsunit/zjquery.js+++ b/frontend_tests/zjsunit/zjquery.js@@ -1,5 +1,7 @@"use strict";+const {strict: assert} = require("assert");+const noop = function () {};class Event {