minor: Clarify that message_store is a deep test.

I believe the original message_store example used
to stub some things here, but the part of the tutorial
that pertains to stubbing is further down.
This commit is contained in:
Steve Howell 2021-02-12 14:55:52 +00:00 committed by Steve Howell
parent c0874462dc
commit 70fb1c225b
1 changed files with 5 additions and 7 deletions

View File

@ -108,13 +108,9 @@ const messages = {
},
};
// We are going to test a core module called messages_store.js. It
// depends on some code that we aren't really interested in testing,
// so let's create some stub functions that do nothing.
const noop = () => undefined;
// We can also bring in real code:
// We are going to test a core module called messages_store.js next.
// This is an example of a deep unit test, where our dependencies
// are easy to test. Start by requiring the dependencies:
zrequire("recent_senders");
const unread = zrequire("unread");
const stream_topic_history = zrequire("stream_topic_history");
@ -344,6 +340,8 @@ run_test("add_user_event", () => {
*/
const noop = () => {};
const activity = set_global("activity", {});
const message_live_update = set_global("message_live_update", {});
const pm_list = set_global("pm_list", {});