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

@@ -4,6 +4,7 @@ const assert = require("node:assert/strict");
const events = require("./lib/events.cjs");
const {make_user_group} = require("./lib/example_group.cjs");
const {make_realm} = require("./lib/example_realm.cjs");
const {mock_esm, set_global, with_overrides, zrequire} = require("./lib/namespace.cjs");
const {make_stub} = require("./lib/stub.cjs");
const {run_test, noop} = require("./lib/test.cjs");
@@ -110,7 +111,7 @@ const {initialize: initialize_realm_user_settings_defaults} = zrequire(
const {set_current_user, set_realm} = zrequire("state_data");
const {initialize_user_settings} = zrequire("user_settings");
const realm = {};
const realm = make_realm();
set_realm(realm);
const current_user = {};
set_current_user(current_user);