mirror of https://github.com/zulip/zulip.git
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:
parent
c0874462dc
commit
70fb1c225b
|
@ -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", {});
|
||||
|
|
Loading…
Reference in New Issue