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.

node tests: Clear message_user_ids.

Steve Howell5fe8bbd9da94
diff --git a/frontend_tests/node_tests/message_store.js b/frontend_tests/node_tests/message_store.js
index 7c9b7bd8df2..1436cf59c9a 100644
--- a/frontend_tests/node_tests/message_store.js
+++ b/frontend_tests/node_tests/message_store.js
@@ -90,6 +90,7 @@ function convert_recipients(people) {
function test(label, f) {
run_test(label, (override) => {
message_store.clear_for_testing();
+ message_user_ids.clear_for_testing();
f(override);
});
}
diff --git a/static/js/message_user_ids.js b/static/js/message_user_ids.js
index e4684fd99c3..d7b2ded28fa 100644
--- a/static/js/message_user_ids.js
+++ b/static/js/message_user_ids.js
@@ -13,6 +13,10 @@
*/
const user_set = new Set();
+export function clear_for_testing() {
+ user_set.clear();
+}
+
export function user_ids() {
return Array.from(user_set);
}