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.

message list: Stub with Error instead of asserting zero calls in tests.

Abhijeet Prasad Bodas29bf97313a52
diff --git a/frontend_tests/node_tests/message_list_data.js b/frontend_tests/node_tests/message_list_data.js
index da38bbc198f..d3bb2b72697 100644
--- a/frontend_tests/node_tests/message_list_data.js
+++ b/frontend_tests/node_tests/message_list_data.js
@@ -120,17 +120,16 @@ run_test("muting", () => {
// `messages_filtered_for_topic_mutes` should skip filtering
// messages if `excludes_muted_topics` is false.
- let is_topic_muted_calls = 0;
-
with_field(
muting,
"is_topic_muted",
() => {
- is_topic_muted_calls = is_topic_muted_calls + 1;
+ throw new Error(
+ "Messages should not be filtered for topic mutes if excludes_muted_topics is false.",
+ );
},
() => {
const res = mld.messages_filtered_for_topic_mutes(msgs);
- assert.equal(is_topic_muted_calls, 0);
assert.deepEqual(res, msgs);
},
);