node tests: Sort list of exempt files.

This commit is contained in:
Steve Howell 2021-12-18 20:49:09 +00:00 committed by Tim Abbott
parent 0777cd73bb
commit cb21506ea7
1 changed files with 167 additions and 157 deletions

View File

@ -5,7 +5,7 @@ import os
import pwd import pwd
import subprocess import subprocess
import sys import sys
from typing import Any, Dict, List from typing import Any, Dict, List, Set
TOOLS_DIR = os.path.dirname(os.path.abspath(__file__)) TOOLS_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.dirname(TOOLS_DIR)) sys.path.insert(0, os.path.dirname(TOOLS_DIR))
@ -33,29 +33,38 @@ USAGE = """
tools/test-js-with-node --coverage - to generate coverage report tools/test-js-with-node --coverage - to generate coverage report
""" """
def make_set(files: List[str]) -> Set[str]:
for i in range(1, len(files)):
if files[i - 1] > files[i]:
raise Exception(f"Please move {files[i]} so that names are sorted.")
return set(files)
# We do not yet require 100% line coverage for these files: # We do not yet require 100% line coverage for these files:
EXEMPT_FILES = { EXEMPT_FILES = make_set(
[
"static/js/about_zulip.js", "static/js/about_zulip.js",
"static/js/admin.js", "static/js/admin.js",
"static/js/alert_popup.ts", "static/js/alert_popup.ts",
"static/js/archive.js", "static/js/archive.js",
"static/js/attachments_ui.js", "static/js/attachments_ui.js",
"static/js/avatar.js", "static/js/avatar.js",
"static/js/billing/event_status.js",
"static/js/billing/helpers.js", "static/js/billing/helpers.js",
"static/js/billing/upgrade.js", "static/js/billing/upgrade.js",
"static/js/blueslip.ts", "static/js/blueslip.ts",
"static/js/blueslip_stacktrace.ts", "static/js/blueslip_stacktrace.ts",
"static/js/click_handlers.js", "static/js/click_handlers.js",
"static/js/compose.js",
"static/js/compose_actions.js", "static/js/compose_actions.js",
"static/js/compose_closed_ui.js", "static/js/compose_closed_ui.js",
"static/js/composebox_typeahead.js",
"static/js/compose_fade.js", "static/js/compose_fade.js",
"static/js/compose_validate.js",
"static/js/compose.js",
"static/js/compose_ui.js", "static/js/compose_ui.js",
"static/js/compose_validate.js",
"static/js/composebox_typeahead.js",
"static/js/condense.js", "static/js/condense.js",
"static/js/confirm_dialog.js", "static/js/confirm_dialog.js",
"static/js/dialog_widget.js",
"static/js/copy_and_paste.js", "static/js/copy_and_paste.js",
"static/js/csrf.ts", "static/js/csrf.ts",
"static/js/css_variables.js", "static/js/css_variables.js",
@ -63,7 +72,9 @@ EXEMPT_FILES = {
"static/js/debug.js", "static/js/debug.js",
"static/js/deprecated_feature_notice.js", "static/js/deprecated_feature_notice.js",
"static/js/desktop_integration.js", "static/js/desktop_integration.js",
"static/js/dialog_widget.js",
"static/js/drafts.js", "static/js/drafts.js",
"static/js/dropdown_list_widget.js",
"static/js/echo.js", "static/js/echo.js",
"static/js/emoji_picker.js", "static/js/emoji_picker.js",
"static/js/emojisets.js", "static/js/emojisets.js",
@ -79,38 +90,38 @@ EXEMPT_FILES = {
"static/js/hotspots.js", "static/js/hotspots.js",
"static/js/info_overlay.js", "static/js/info_overlay.js",
"static/js/invite.js", "static/js/invite.js",
"static/js/lightbox_canvas.js",
"static/js/lightbox.js", "static/js/lightbox.js",
"static/js/lightbox_canvas.js",
"static/js/list_util.ts", "static/js/list_util.ts",
"static/js/loading.ts", "static/js/loading.ts",
"static/js/local_message.js", "static/js/local_message.js",
"static/js/localstorage.js", "static/js/localstorage.js",
"static/js/spectators.js",
"static/js/message_edit.js", "static/js/message_edit.js",
"static/js/message_edit_history.js", "static/js/message_edit_history.js",
"static/js/message_events.js", "static/js/message_events.js",
"static/js/message_fetch.js", "static/js/message_fetch.js",
"static/js/message_list_data.js",
"static/js/message_list.js", "static/js/message_list.js",
"static/js/message_list_data.js",
"static/js/message_list_view.js", "static/js/message_list_view.js",
"static/js/message_lists.js", "static/js/message_lists.js",
"static/js/message_live_update.js", "static/js/message_live_update.js",
"static/js/message_scroll.js", "static/js/message_scroll.js",
"static/js/message_util.js", "static/js/message_util.js",
"static/js/message_view_header.js",
"static/js/message_viewport.js", "static/js/message_viewport.js",
"static/js/muted_topics_ui.js", "static/js/muted_topics_ui.js",
"static/js/muted_users_ui.js", "static/js/muted_users_ui.js",
"static/js/narrow.js", "static/js/narrow.js",
"static/js/navbar_alerts.js",
"static/js/navigate.js", "static/js/navigate.js",
"static/js/notifications.js", "static/js/notifications.js",
"static/js/overlays.js", "static/js/overlays.js",
"static/js/padded_widget.ts", "static/js/padded_widget.ts",
"static/js/page_params.ts", "static/js/page_params.ts",
"static/js/navbar_alerts.js",
"static/js/pm_list_dom.js", "static/js/pm_list_dom.js",
"static/js/poll_widget.js", "static/js/poll_widget.js",
"static/js/popovers.js",
"static/js/popover_menus.js", "static/js/popover_menus.js",
"static/js/popovers.js",
"static/js/ready.ts", "static/js/ready.ts",
"static/js/realm_icon.js", "static/js/realm_icon.js",
"static/js/realm_logo.js", "static/js/realm_logo.js",
@ -126,21 +137,20 @@ EXEMPT_FILES = {
"static/js/search_pill_widget.js", "static/js/search_pill_widget.js",
"static/js/sent_messages.js", "static/js/sent_messages.js",
"static/js/server_events.js", "static/js/server_events.js",
"static/js/dropdown_list_widget.js", "static/js/settings.js",
"static/js/settings_account.js", "static/js/settings_account.js",
"static/js/settings_bots.js", "static/js/settings_bots.js",
"static/js/settings_display.js", "static/js/settings_display.js",
"static/js/settings_emoji.js", "static/js/settings_emoji.js",
"static/js/settings_exports.js", "static/js/settings_exports.js",
"static/js/settings_invites.js", "static/js/settings_invites.js",
"static/js/settings.js",
"static/js/settings_linkifiers.js", "static/js/settings_linkifiers.js",
"static/js/settings_playgrounds.js",
"static/js/settings_muted_topics.js", "static/js/settings_muted_topics.js",
"static/js/settings_muted_users.js", "static/js/settings_muted_users.js",
"static/js/settings_notifications.js", "static/js/settings_notifications.js",
"static/js/settings_org.js", "static/js/settings_org.js",
"static/js/settings_panel_menu.js", "static/js/settings_panel_menu.js",
"static/js/settings_playgrounds.js",
"static/js/settings_profile_fields.js", "static/js/settings_profile_fields.js",
"static/js/settings_realm_user_settings_defaults.js", "static/js/settings_realm_user_settings_defaults.js",
"static/js/settings_sections.js", "static/js/settings_sections.js",
@ -149,6 +159,7 @@ EXEMPT_FILES = {
"static/js/settings_ui.js", "static/js/settings_ui.js",
"static/js/settings_users.js", "static/js/settings_users.js",
"static/js/setup.js", "static/js/setup.js",
"static/js/spectators.js",
"static/js/spoilers.ts", "static/js/spoilers.ts",
"static/js/starred_messages_ui.js", "static/js/starred_messages_ui.js",
"static/js/stream_bar.js", "static/js/stream_bar.js",
@ -158,11 +169,10 @@ EXEMPT_FILES = {
"static/js/stream_list.js", "static/js/stream_list.js",
"static/js/stream_muting.js", "static/js/stream_muting.js",
"static/js/stream_popover.js", "static/js/stream_popover.js",
"static/js/stream_settings_ui.js",
"static/js/stream_subscribers_ui.js", "static/js/stream_subscribers_ui.js",
"static/js/stream_ui_updates.js", "static/js/stream_ui_updates.js",
"static/js/submessage.js", "static/js/submessage.js",
"static/js/stream_settings_ui.js",
"static/js/message_view_header.js",
"static/js/timerender.ts", "static/js/timerender.ts",
"static/js/tippyjs.js", "static/js/tippyjs.js",
"static/js/todo_widget.js", "static/js/todo_widget.js",
@ -170,10 +180,10 @@ EXEMPT_FILES = {
"static/js/topic_zoom.js", "static/js/topic_zoom.js",
"static/js/tutorial.js", "static/js/tutorial.js",
"static/js/types.ts", "static/js/types.ts",
"static/js/typing_events.js",
"static/js/typing.js", "static/js/typing.js",
"static/js/ui_init.js", "static/js/typing_events.js",
"static/js/ui.js", "static/js/ui.js",
"static/js/ui_init.js",
"static/js/ui_report.ts", "static/js/ui_report.ts",
"static/js/ui_util.ts", "static/js/ui_util.ts",
"static/js/unread_ops.js", "static/js/unread_ops.js",
@ -187,9 +197,9 @@ EXEMPT_FILES = {
"static/js/zform.js", "static/js/zform.js",
"static/js/zulip.js", "static/js/zulip.js",
"static/js/zulip_test.js", "static/js/zulip_test.js",
"static/js/billing/event_status.js",
"static/shared/js/poll_data.js", "static/shared/js/poll_data.js",
} ]
)
from tools.lib.test_script import add_provision_check_override_param, assert_provisioning_status_ok from tools.lib.test_script import add_provision_check_override_param, assert_provisioning_status_ok