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: Avoid silly stub in filter test.

Steve Howellaa21ccf61fcb
diff --git a/frontend_tests/node_tests/filter.js b/frontend_tests/node_tests/filter.js
index 6bcf8aaaa49..c0b7ac8e613 100644
--- a/frontend_tests/node_tests/filter.js
+++ b/frontend_tests/node_tests/filter.js
@@ -374,13 +374,13 @@ run_test("show_first_unread", () => {
assert(!filter.allow_use_first_unread_when_narrowing());
filter = new Filter();
- filter.can_mark_messages_read = () => true;
+ assert(filter.can_mark_messages_read());
assert(filter.allow_use_first_unread_when_narrowing());
// Side case
operators = [{operator: "is", operand: "any"}];
filter = new Filter(operators);
- filter.can_mark_messages_read = () => false;
+ assert(!filter.can_mark_messages_read());
assert(filter.allow_use_first_unread_when_narrowing());
});
run_test("filter_with_new_params_topic", () => {