tests: Use make_realm to create type-correct realm objects.

Another step in the direction of improving node tests
and using type-correct organic data as much as possible.
This commit is contained in:
Kislay Verma
2025-08-14 18:17:55 +05:30
committed by Tim Abbott
parent c604ecb902
commit 67ca49488f
66 changed files with 302 additions and 72 deletions

View File

@@ -6,6 +6,7 @@ const katex = require("katex");
const markdown_test_cases = require("../../zerver/tests/fixtures/markdown_test_cases.json");
const {make_realm} = require("./lib/example_realm.cjs");
const markdown_assert = require("./lib/markdown_assert.cjs");
const {mock_esm, set_global, zrequire} = require("./lib/namespace.cjs");
const {run_test} = require("./lib/test.cjs");
@@ -62,7 +63,7 @@ const settings_config = zrequire("settings_config");
const {initialize_user_settings} = zrequire("user_settings");
const REALM_EMPTY_TOPIC_DISPLAY_NAME = "general chat";
set_realm({realm_empty_topic_display_name: REALM_EMPTY_TOPIC_DISPLAY_NAME});
set_realm(make_realm({realm_empty_topic_display_name: REALM_EMPTY_TOPIC_DISPLAY_NAME}));
const user_settings = {
web_channel_default_view: settings_config.web_channel_default_view_values.channel_feed.code,
};