zulip/frontend_tests/node_tests
Steve Howell 90730a18d9 node tests: Simplify stream_events.
These are still kind of a mess.

The old code combined the worst of both worlds:

    - we had one monolithic test
    - we called the events multiple times,
      verifying a different stub each time

Now I make the tests more granular.

We could actually re-combine the tests, but
in a nicer way, so that we just set
up multiple stubs and verify that all stubs
get correctly invoked.
2021-02-11 11:29:21 -05:00
..
lib tools: Rename tool to check-schemas. 2021-01-20 13:17:32 -08:00
activity.js js: Convert static/js/user_search.js to ES6 module. 2021-02-10 10:27:14 -08:00
alert_words.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
alert_words_ui.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
billing.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
billing_helpers.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
blueslip_stacktrace.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
bot_data.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
buddy_data.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
buddy_list.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
channel.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
color_data.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
colorspace.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
common.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
components.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
compose.js js: Convert static/js/zcommand.js to ES6 module. 2021-02-10 10:27:14 -08:00
compose_actions.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
compose_fade.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
compose_pm_pill.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
compose_ui.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
composebox_typeahead.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
copy_and_paste.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
dispatch.js node tests: Move streams tests to dispatch_subs. 2021-02-11 11:29:21 -05:00
dispatch_subs.js node tests: Move streams tests to dispatch_subs. 2021-02-11 11:29:21 -05:00
drafts.js zjsunit: Change override API to work with non-global modules. 2021-02-11 07:35:28 -05:00
dropdown_list_widget.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
echo.js js: Convert static/js/alert_words.js to ES6 module. 2021-02-10 10:27:14 -08:00
emoji.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
emoji_picker.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
fenced_code.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
fetch_status.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
filter.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
fold_dict.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
general.js node_tests: Change stub/events pattern to work with non-global modules. 2021-02-11 07:35:28 -05:00
hash_util.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
hashchange.js node_tests: Change stub/events pattern to work with non-global modules. 2021-02-11 07:35:28 -05:00
hotkey.js zjsunit: Change override API to work with non-global modules. 2021-02-11 07:35:28 -05:00
i18n.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
input_pill.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
keydown_util.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
lazy_set.js eslint: Fix unicorn/no-array-callback-reference. 2021-01-25 14:53:19 -08:00
lightbox.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
list_cursor.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
list_widget.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
markdown.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
markdown_katex.js node_tests: Remove unnecessary zrequire calls for ES6 modules. 2021-02-10 07:35:11 -08:00
message_edit.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
message_events.js node_tests: Change stub/events pattern to work with non-global modules. 2021-02-11 07:35:28 -05:00
message_fetch.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
message_flags.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
message_list.js node tests: Reuse message_list stubs. 2021-02-11 11:29:21 -05:00
message_list_data.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
message_list_view.js node_tests: Remove irrelevant set_global calls for ES6 modules. 2021-02-10 10:27:14 -08:00
message_store.js js: Convert static/js/alert_words.js to ES6 module. 2021-02-10 10:27:14 -08:00
muting.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
narrow.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
narrow_activate.js node_tests: Change stub/events pattern to work with non-global modules. 2021-02-11 07:35:28 -05:00
narrow_local.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
narrow_state.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
narrow_unread.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
notifications.js js: Convert static/js/alert_words.js to ES6 module. 2021-02-10 10:27:14 -08:00
password.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
peer_data.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
people.js node_tests: Remove irrelevant set_global calls for ES6 modules. 2021-02-10 10:27:14 -08:00
people_errors.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
pm_conversations.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
pm_list.js js: Convert static/js/user_status.js to ES6 module. 2021-02-10 10:27:14 -08:00
poll_widget.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
popovers.js zjsunit: Change override API to work with non-global modules. 2021-02-11 07:35:28 -05:00
presence.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
reactions.js zjsunit: Change override API to work with non-global modules. 2021-02-11 07:35:28 -05:00
recent_senders.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
recent_topics.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
rendered_markdown.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
rtl.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
schema.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
scroll_util.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
search.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
search_legacy.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
search_pill.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
search_suggestion.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
search_suggestion_legacy.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
server_events.js js: Convert static/js/server_events_dispatch.js to ES6 module. 2021-02-10 10:27:14 -08:00
settings_bots.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
settings_data.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
settings_emoji.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
settings_muting.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
settings_org.js zjsunit: Change override API to work with non-global modules. 2021-02-11 07:35:28 -05:00
settings_profile_fields.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
settings_user_groups.js js: Convert static/js/pill_typeahead.js to ES6 module. 2021-02-10 10:27:14 -08:00
spoilers.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
stream_data.js slugs: Fix regex for legacy stream slugs. 2021-02-10 14:37:34 -08:00
stream_edit.js js: Convert static/js/stream_ui_updates.js to ES6 module. 2021-02-10 10:27:14 -08:00
stream_events.js node tests: Simplify stream_events. 2021-02-11 11:29:21 -05:00
stream_list.js js: Convert static/js/colorspace.js to ES6 module. 2021-02-10 10:27:14 -08:00
stream_pill.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
stream_search.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
stream_sort.js zjsunit: Change override API to work with non-global modules. 2021-02-11 07:35:28 -05:00
stream_topic_history.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
submessage.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
subs.js js: Convert static/js/search_util.js to ES6 module. 2021-02-10 10:27:14 -08:00
support.js node_tests: Remove duplicate jQuery stubs. 2020-12-01 07:14:00 -05:00
timerender.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
top_left_corner.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
topic_generator.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
topic_list_data.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
transmit.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
typeahead.js eslint: Fix unicorn/no-array-callback-reference. 2021-01-25 14:53:19 -08:00
typeahead_helper.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
typing_data.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
typing_status.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
ui.js node_tests: Skip unnecessary explicit uses of global. 2020-12-01 07:14:00 -05:00
ui_init.js js: Convert static/js/spoilers.js to ES6 module. 2021-02-10 10:27:14 -08:00
unread.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
upgrade.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
upload.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
user_events.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
user_groups.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
user_pill.js js: Convert static/js/pill_typeahead.js to ES6 module. 2021-02-10 10:27:14 -08:00
user_status.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
util.js node_tests: Skip unnecessary explicit uses of global. 2020-12-01 07:14:00 -05:00
vdom.js node_tests: Don’t read from most deprecated global variables. 2021-02-10 07:40:22 -08:00
widgetize.js js: Convert static/js/zform.js to ES6 module. 2021-02-10 10:27:14 -08:00
zblueslip.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00
zjquery.js zjsunit: Deglobalize run_test. 2020-12-01 07:14:00 -05:00