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 pm_conversations.test.cjs.

Tim Abbottd6d9ff69fd26
diff --git a/web/tests/pm_conversations.test.cjs b/web/tests/pm_conversations.test.cjs
index 858306219fb..4a3d905b021 100644
--- a/web/tests/pm_conversations.test.cjs
+++ b/web/tests/pm_conversations.test.cjs
@@ -2,6 +2,7 @@
const assert = require("node:assert/strict");
+const {make_user} = require("./lib/example_user.cjs");
const {zrequire} = require("./lib/namespace.cjs");
const {run_test} = require("./lib/test.cjs");
@@ -14,29 +15,29 @@ const {set_current_user} = zrequire("state_data");
const current_user = {};
set_current_user(current_user);
-const alice = {
- user_id: 1,
+const alice = make_user({
+ user_id: 1,
full_name: "Alice",
-};
+});
-const isaac = {
- user_id: 2,
+const isaac = make_user({
+ user_id: 2,
full_name: "Isaac",
-};
+});
-const alex = {
- user_id: 3,
+const alex = make_user({
+ user_id: 3,
full_name: "Alex",
-};
+});
-const me = {
- user_id: 15,
+const me = make_user({
+ user_id: 15,
full_name: "Me",
-};
+});
people.add_active_user(alice);
people.add_active_user(isaac);