Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tests: Export rewired variables.
Anders Kaseorgdb2723036fd1
diff --git a/web/shared/src/typing_status.ts b/web/shared/src/typing_status.tsindex c640cc02b99..463e5eb243b 100644--- a/web/shared/src/typing_status.ts+++ b/web/shared/src/typing_status.ts@@ -87,7 +87,8 @@ function set_next_start_time(current_time: number, typing_started_wait_period: nstate.next_send_start_time = current_time + typing_started_wait_period;}-function actually_ping_server(+// Exported for tests+export function actually_ping_server(worker: TypingStatusWorker,recipient: Recipient,current_time: number,diff --git a/web/src/compose_closed_ui.ts b/web/src/compose_closed_ui.tsindex 01fc273d119..9949d596666 100644--- a/web/src/compose_closed_ui.ts+++ b/web/src/compose_closed_ui.ts@@ -60,7 +60,8 @@ export function get_recipient_label(message?: ComposeClosedMessage): string {return "";}-function update_reply_button_state(disable = false): void {+// Exported for tests+export function update_reply_button_state(disable = false): void {$(".compose_reply_button").attr("disabled", disable ? "disabled" : null);if (disable) {$("#compose_buttons .compose-reply-button-wrapper").attr(diff --git a/web/src/compose_validate.ts b/web/src/compose_validate.tsindex 098aa2a0e49..8a07bc762d0 100644--- a/web/src/compose_validate.ts+++ b/web/src/compose_validate.ts@@ -475,7 +475,8 @@ function is_recipient_large_topic(): boolean {return topic_participant_count_more_than_threshold(stream_id, compose_state.topic());}-function wildcard_mention_policy_authorizes_user(): boolean {+// Exported for tests+export function wildcard_mention_policy_authorizes_user(): boolean {if (realm.realm_wildcard_mention_policy ===settings_config.wildcard_mention_policy_values.by_everyone.codediff --git a/web/src/search.ts b/web/src/search.tsindex c83bb46826b..931e9c4f47f 100644--- a/web/src/search.ts+++ b/web/src/search.ts@@ -389,7 +389,8 @@ function reset_searchbox(clear = false): void {}}-function exit_search(opts: {keep_search_narrow_open: boolean}): void {+// Exported for tests+export function exit_search(opts: {keep_search_narrow_open: boolean}): void {const filter = narrow_state.filter();if (!filter || filter.is_common_narrow()) {// for common narrows, we change the UI (and don't redirect)diff --git a/web/src/settings_org.ts b/web/src/settings_org.tsindex 2bdf2b4a6a8..afdab192180 100644--- a/web/src/settings_org.ts+++ b/web/src/settings_org.ts@@ -1054,7 +1054,8 @@ export function register_save_discard_widget_handlers();}-function initialize_group_setting_widgets(): void {+// Exported for tests+export function initialize_group_setting_widgets(): void {const realm_group_permission_settings = Object.entries(realm.server_supported_permission_settings.realm,);