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

@@ -3,6 +3,7 @@
const assert = require("node:assert/strict");
const {make_user_group} = require("./lib/example_group.cjs");
const {make_realm} = require("./lib/example_realm.cjs");
const {mock_esm, set_global, zrequire} = require("./lib/namespace.cjs");
const {run_test} = require("./lib/test.cjs");
const $ = require("./lib/zjquery.cjs");
@@ -46,7 +47,7 @@ const stream_settings_ui = zrequire("stream_settings_ui");
const user_groups = zrequire("user_groups");
const {initialize_user_settings} = zrequire("user_settings");
const realm = {};
const realm = make_realm();
set_realm(realm);
set_current_user({});
initialize_user_settings({user_settings: {}});