Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tests: Use typed helpers in user_pill.test.cjs.

Tim Abbotta8b6f979ceee
diff --git a/web/tests/user_pill.test.cjs b/web/tests/user_pill.test.cjs
index 888e42dc4c2..3ad1be4f7ab 100644
--- a/web/tests/user_pill.test.cjs
+++ b/web/tests/user_pill.test.cjs
@@ -3,6 +3,7 @@
const assert = require("node:assert/strict");
const {make_realm} = require("./lib/example_realm.cjs");
+const {make_user} = require("./lib/example_user.cjs");
const {mock_esm, zrequire} = require("./lib/namespace.cjs");
const {run_test} = require("./lib/test.cjs");
const blueslip = require("./lib/zblueslip.cjs");
@@ -16,23 +17,23 @@ const settings_data = mock_esm("../src/settings_data");
const realm = make_realm();
set_realm(realm);
-const alice = {
+const alice = make_user({
user_id: 99,
full_name: "Alice Barson",
-};
+});
-const isaac = {
+const isaac = make_user({
user_id: 102,
full_name: "Isaac Newton",
-};
+});
-const isaac_duplicate = {
+const isaac_duplicate = make_user({
user_id: 102102,
full_name: "Isaac Newton",
-};
+});
const isaac_item = {
@@ -41,16 +42,16 @@ const isaac_item = {
user_id: isaac.user_id,
deactivated: false,
img_src: `/avatar/${isaac.user_id}`,
- is_bot: undefined,
+ is_bot: false,
status_emoji_info: undefined,
should_add_guest_user_indicator: false,
};
-const deactivated_user = {
+const deactivated_user = make_user({
user_id: 104,
full_name: "Deactivated User",
-};
+});
const deactivated_user_item = {