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: Use override for fill_screen_with_content.

Steve Howell36077774fcb8
diff --git a/frontend_tests/node_tests/activity.js b/frontend_tests/node_tests/activity.js
index ede07282f33..1632c5928e6 100644
--- a/frontend_tests/node_tests/activity.js
+++ b/frontend_tests/node_tests/activity.js
@@ -96,16 +96,6 @@ presence_info.set(jill.user_id, {status: "active"});
presence.__Rewire__("presence_info", presence_info);
-// Simulate a small window by having the
-// fill_screen_with_content render the entire
-// list in one pass. We will do more refined
-// testing in the buddy_list node tests.
-buddy_list.fill_screen_with_content = () => {
- buddy_list.render_more({
- chunk_size: 100,
- });
-};
-
run_test("reload_defaults", () => {
blueslip.expect("warn", "get_filter_text() is called before initialization");
assert.equal(activity.get_filter_text(), "");
@@ -189,6 +179,16 @@ function clear_buddy_list() {
function test_ui(label, f) {
run_test(label, (override) => {
+ // Simulate a small window by having the
+ // fill_screen_with_content render the entire
+ // list in one pass. We will do more refined
+ // testing in the buddy_list node tests.
+ override(buddy_list, "fill_screen_with_content", () => {
+ buddy_list.render_more({
+ chunk_size: 100,
+ });
+ });
+
clear_buddy_list();
muting.set_muted_users([]);
f(override);