From ba8b9a445bcfea9394b5dd281229df66e7a5cbfd Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 8 Oct 2024 15:25:41 -0700 Subject: [PATCH] eslint: Fix unicorn/prefer-node-protocol. Signed-off-by: Anders Kaseorg --- .eslintrc.js | 1 - tools/check-openapi | 2 +- tools/screenshots/message-screenshot.js | 2 +- tools/screenshots/thread-screenshot.js | 2 +- web/debug-require-webpack-plugin.ts | 2 +- web/e2e-tests/admin.test.ts | 2 +- web/e2e-tests/compose.test.ts | 2 +- web/e2e-tests/copy-and-paste.test.ts | 2 +- web/e2e-tests/custom-profile.test.ts | 2 +- web/e2e-tests/delete-message.test.ts | 2 +- web/e2e-tests/drafts.test.ts | 2 +- web/e2e-tests/edit.test.ts | 2 +- web/e2e-tests/lib/common.ts | 6 +++--- web/e2e-tests/mention.test.ts | 2 +- web/e2e-tests/message-basics.test.ts | 2 +- web/e2e-tests/navigation.test.ts | 2 +- web/e2e-tests/realm-creation.test.ts | 2 +- web/e2e-tests/realm-linkifier.test.ts | 2 +- web/e2e-tests/realm-playground.test.ts | 2 +- web/e2e-tests/settings.test.ts | 2 +- web/e2e-tests/stars.test.ts | 2 +- web/e2e-tests/stream_create.test.ts | 2 +- web/e2e-tests/user-deactivation.test.ts | 2 +- web/postcss.config.js | 2 +- web/tests/activity.test.js | 2 +- web/tests/alert_words.test.js | 2 +- web/tests/alert_words_ui.test.js | 2 +- web/tests/blueslip_stacktrace.test.js | 2 +- web/tests/bot_data.test.js | 2 +- web/tests/browser_history.test.js | 2 +- web/tests/buddy_data.test.js | 2 +- web/tests/buddy_list.test.js | 2 +- web/tests/channel.test.js | 2 +- web/tests/color_data.test.js | 2 +- web/tests/common.test.js | 2 +- web/tests/components.test.js | 2 +- web/tests/compose.test.js | 2 +- web/tests/compose_actions.test.js | 2 +- web/tests/compose_closed_ui.test.js | 2 +- web/tests/compose_fade.test.js | 2 +- web/tests/compose_pm_pill.test.js | 2 +- web/tests/compose_state.test.js | 2 +- web/tests/compose_ui.test.js | 2 +- web/tests/compose_validate.test.js | 2 +- web/tests/compose_video.test.js | 2 +- web/tests/composebox_typeahead.test.js | 2 +- web/tests/copy_and_paste.test.js | 2 +- web/tests/deprecated_feature_notice.test.js | 2 +- web/tests/dispatch.test.js | 2 +- web/tests/dispatch_subs.test.js | 2 +- web/tests/drafts.test.js | 2 +- web/tests/echo.test.js | 2 +- web/tests/emoji.test.js | 2 +- web/tests/emoji_picker.test.js | 2 +- web/tests/example1.test.js | 2 +- web/tests/example2.test.js | 2 +- web/tests/example3.test.js | 2 +- web/tests/example4.test.js | 2 +- web/tests/example5.test.js | 2 +- web/tests/example6.test.js | 2 +- web/tests/example7.test.js | 2 +- web/tests/example8.test.js | 2 +- web/tests/fenced_code.test.js | 2 +- web/tests/fetch_status.test.js | 2 +- web/tests/filter.test.js | 2 +- web/tests/fold_dict.test.js | 2 +- web/tests/gear_menu_util.test.js | 2 +- web/tests/hash_util.test.js | 2 +- web/tests/hashchange.test.js | 2 +- web/tests/hotkey.test.js | 2 +- web/tests/i18n.test.js | 2 +- web/tests/input_pill.test.js | 2 +- web/tests/internal_url.test.js | 2 +- web/tests/keydown_util.test.js | 2 +- web/tests/lazy_set.test.js | 2 +- web/tests/left_sidebar_navigation_area.test.js | 2 +- web/tests/lib/handlebars.js | 4 ++-- web/tests/lib/index.js | 4 ++-- web/tests/lib/markdown_assert.js | 2 +- web/tests/lib/namespace.js | 6 +++--- web/tests/lib/stub.js | 2 +- web/tests/lib/zblueslip.js | 2 +- web/tests/lib/zjquery.js | 2 +- web/tests/lib/zjquery_element.js | 2 +- web/tests/linkifiers.test.js | 2 +- web/tests/list_cursor.test.js | 2 +- web/tests/list_widget.test.js | 2 +- web/tests/markdown.test.js | 2 +- web/tests/markdown_parse.test.js | 2 +- web/tests/message_edit.test.js | 2 +- web/tests/message_events.test.js | 2 +- web/tests/message_flags.test.js | 2 +- web/tests/message_list.test.js | 2 +- web/tests/message_list_data.test.js | 2 +- web/tests/message_list_view.test.js | 2 +- web/tests/message_store.test.js | 2 +- web/tests/message_view.test.js | 2 +- web/tests/muted_users.test.js | 2 +- web/tests/narrow_activate.test.js | 2 +- web/tests/narrow_local.test.js | 2 +- web/tests/narrow_state.test.js | 2 +- web/tests/narrow_unread.test.js | 2 +- web/tests/navbar_alerts.test.js | 2 +- web/tests/notifications.test.js | 2 +- web/tests/password.test.js | 2 +- web/tests/peer_data.test.js | 2 +- web/tests/people.test.js | 2 +- web/tests/people_errors.test.js | 2 +- web/tests/pill_typeahead.test.js | 2 +- web/tests/pm_conversations.test.js | 2 +- web/tests/pm_list.test.js | 2 +- web/tests/pm_list_data.test.js | 2 +- web/tests/poll_widget.test.js | 2 +- web/tests/popover_menus_data.test.js | 2 +- web/tests/postprocess_content.test.js | 2 +- web/tests/presence.test.js | 2 +- web/tests/reactions.test.js | 2 +- web/tests/realm_playground.test.js | 2 +- web/tests/recent_senders.test.js | 2 +- web/tests/recent_view.test.js | 2 +- web/tests/reload.test.js | 2 +- web/tests/reload_state.test.js | 2 +- web/tests/rendered_markdown.test.js | 2 +- web/tests/resolved_topic.test.js | 2 +- web/tests/rtl.test.js | 2 +- web/tests/saved_snippets.test.js | 2 +- web/tests/scheduled_messages.test.js | 2 +- web/tests/scroll_util.test.js | 2 +- web/tests/search.test.js | 2 +- web/tests/search_suggestion.test.js | 2 +- web/tests/server_events.test.js | 2 +- web/tests/settings_bots.test.js | 2 +- web/tests/settings_config.test.js | 2 +- web/tests/settings_data.test.js | 2 +- web/tests/settings_emoji.test.js | 2 +- web/tests/settings_muted_users.test.js | 2 +- web/tests/settings_org.test.js | 2 +- web/tests/settings_profile_fields.test.js | 2 +- web/tests/settings_realm_domains.test.js | 2 +- web/tests/settings_user_topics.test.js | 2 +- web/tests/spoilers.test.js | 2 +- web/tests/starred_messages.test.js | 2 +- web/tests/stream_create_subscribers_data.test.js | 2 +- web/tests/stream_data.test.js | 2 +- web/tests/stream_edit.test.js | 2 +- web/tests/stream_events.test.js | 2 +- web/tests/stream_list.test.js | 2 +- web/tests/stream_list_sort.test.js | 2 +- web/tests/stream_pill.test.js | 2 +- web/tests/stream_search.test.js | 2 +- web/tests/stream_settings_ui.test.js | 2 +- web/tests/stream_topic_history.test.js | 2 +- web/tests/submessage.test.js | 2 +- web/tests/support.test.js | 6 +++--- web/tests/templates.test.js | 2 +- web/tests/time_zone_util.test.js | 2 +- web/tests/timerender.test.js | 2 +- web/tests/topic_generator.test.js | 2 +- web/tests/topic_link_util.test.js | 2 +- web/tests/topic_list_data.test.js | 2 +- web/tests/transmit.test.js | 2 +- web/tests/typeahead.test.js | 2 +- web/tests/typeahead_helper.test.js | 2 +- web/tests/typing_data.test.js | 2 +- web/tests/typing_events.test.js | 2 +- web/tests/typing_status.test.js | 2 +- web/tests/ui_util.test.js | 2 +- web/tests/unread.test.js | 2 +- web/tests/upload.test.js | 2 +- web/tests/user_events.test.js | 2 +- web/tests/user_group_pill.test.js | 2 +- web/tests/user_groups.test.js | 2 +- web/tests/user_pill.test.js | 2 +- web/tests/user_search.test.js | 2 +- web/tests/user_status.test.js | 2 +- web/tests/user_topics.test.js | 2 +- web/tests/user_topics_ui.test.js | 2 +- web/tests/util.test.js | 2 +- web/tests/vdom.test.js | 2 +- web/tests/watchdog.test.js | 2 +- web/tests/widgetize.test.js | 2 +- web/tests/zblueslip.test.js | 2 +- web/tests/zjquery.test.js | 2 +- web/webpack.config.ts | 2 +- 184 files changed, 191 insertions(+), 192 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1f1bd4c59d..d7048a3046 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -127,7 +127,6 @@ module.exports = { "unicorn/numeric-separators-style": "off", "unicorn/prefer-global-this": "off", "unicorn/prefer-module": "off", - "unicorn/prefer-node-protocol": "off", "unicorn/prefer-string-raw": "off", "unicorn/prefer-ternary": "off", "unicorn/prefer-top-level-await": "off", diff --git a/tools/check-openapi b/tools/check-openapi index 76e25b44ca..bdbc6d2f87 100755 --- a/tools/check-openapi +++ b/tools/check-openapi @@ -2,7 +2,7 @@ "use strict"; -const fs = require("fs"); +const fs = require("node:fs"); const Diff = require("diff"); const ExampleValidator = require("openapi-examples-validator"); diff --git a/tools/screenshots/message-screenshot.js b/tools/screenshots/message-screenshot.js index d42859eddf..7b2837ad1d 100644 --- a/tools/screenshots/message-screenshot.js +++ b/tools/screenshots/message-screenshot.js @@ -2,7 +2,7 @@ /* global $, CSS */ -const path = require("path"); +const path = require("node:path"); const {program} = require("commander"); require("css.escape"); diff --git a/tools/screenshots/thread-screenshot.js b/tools/screenshots/thread-screenshot.js index 97cedbf40e..19a53fd758 100644 --- a/tools/screenshots/thread-screenshot.js +++ b/tools/screenshots/thread-screenshot.js @@ -2,7 +2,7 @@ /* global $, CSS */ -const path = require("path"); +const path = require("node:path"); const {program} = require("commander"); require("css.escape"); diff --git a/web/debug-require-webpack-plugin.ts b/web/debug-require-webpack-plugin.ts index 1547d5cfda..5c20c7c450 100644 --- a/web/debug-require-webpack-plugin.ts +++ b/web/debug-require-webpack-plugin.ts @@ -2,7 +2,7 @@ // debugging. It also exposes the list of modules it knows about as the keys // of the require.ids object. -import path from "path"; +import path from "node:path"; import type {ResolveRequest} from "enhanced-resolve"; import type {Chunk, Compiler, WebpackPluginInstance} from "webpack"; diff --git a/web/e2e-tests/admin.test.ts b/web/e2e-tests/admin.test.ts index e462a91c45..4fa9dbc729 100644 --- a/web/e2e-tests/admin.test.ts +++ b/web/e2e-tests/admin.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/compose.test.ts b/web/e2e-tests/compose.test.ts index 51efdcb1b5..9c2381046e 100644 --- a/web/e2e-tests/compose.test.ts +++ b/web/e2e-tests/compose.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/copy-and-paste.test.ts b/web/e2e-tests/copy-and-paste.test.ts index 7461c02531..6e568f85ce 100644 --- a/web/e2e-tests/copy-and-paste.test.ts +++ b/web/e2e-tests/copy-and-paste.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/custom-profile.test.ts b/web/e2e-tests/custom-profile.test.ts index fe16e16a80..bec5b7cff0 100644 --- a/web/e2e-tests/custom-profile.test.ts +++ b/web/e2e-tests/custom-profile.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/delete-message.test.ts b/web/e2e-tests/delete-message.test.ts index 3332e7564c..9a23dba332 100644 --- a/web/e2e-tests/delete-message.test.ts +++ b/web/e2e-tests/delete-message.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/drafts.test.ts b/web/e2e-tests/drafts.test.ts index a3f101beb0..e6159b4e8a 100644 --- a/web/e2e-tests/drafts.test.ts +++ b/web/e2e-tests/drafts.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/edit.test.ts b/web/e2e-tests/edit.test.ts index e08ce21d55..23e31897fd 100644 --- a/web/e2e-tests/edit.test.ts +++ b/web/e2e-tests/edit.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/lib/common.ts b/web/e2e-tests/lib/common.ts index 1f0e993bf8..79cded3f08 100644 --- a/web/e2e-tests/lib/common.ts +++ b/web/e2e-tests/lib/common.ts @@ -1,7 +1,7 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import "css.escape"; -import path from "path"; -import timersPromises from "timers/promises"; +import path from "node:path"; +import timersPromises from "node:timers/promises"; import ErrorStackParser from "error-stack-parser"; import type {Browser, ConsoleMessage, ConsoleMessageLocation, ElementHandle, Page} from "puppeteer"; diff --git a/web/e2e-tests/mention.test.ts b/web/e2e-tests/mention.test.ts index 336320f35b..02874c1786 100644 --- a/web/e2e-tests/mention.test.ts +++ b/web/e2e-tests/mention.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/message-basics.test.ts b/web/e2e-tests/message-basics.test.ts index 48d07e2f5d..3262947209 100644 --- a/web/e2e-tests/message-basics.test.ts +++ b/web/e2e-tests/message-basics.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/navigation.test.ts b/web/e2e-tests/navigation.test.ts index fd5b2578cb..d95b7756f3 100644 --- a/web/e2e-tests/navigation.test.ts +++ b/web/e2e-tests/navigation.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/realm-creation.test.ts b/web/e2e-tests/realm-creation.test.ts index 9fa51d7928..fc208ea0ea 100644 --- a/web/e2e-tests/realm-creation.test.ts +++ b/web/e2e-tests/realm-creation.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; import {z} from "zod"; diff --git a/web/e2e-tests/realm-linkifier.test.ts b/web/e2e-tests/realm-linkifier.test.ts index 9394b01273..8bbcffcf0c 100644 --- a/web/e2e-tests/realm-linkifier.test.ts +++ b/web/e2e-tests/realm-linkifier.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/realm-playground.test.ts b/web/e2e-tests/realm-playground.test.ts index 60beb60a56..b430abb9bc 100644 --- a/web/e2e-tests/realm-playground.test.ts +++ b/web/e2e-tests/realm-playground.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/settings.test.ts b/web/e2e-tests/settings.test.ts index cace811082..1f3b08e86c 100644 --- a/web/e2e-tests/settings.test.ts +++ b/web/e2e-tests/settings.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/stars.test.ts b/web/e2e-tests/stars.test.ts index aa6dc362ec..76ca5011ea 100644 --- a/web/e2e-tests/stars.test.ts +++ b/web/e2e-tests/stars.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/stream_create.test.ts b/web/e2e-tests/stream_create.test.ts index 78a7bf7358..1f2ffec7a6 100644 --- a/web/e2e-tests/stream_create.test.ts +++ b/web/e2e-tests/stream_create.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/e2e-tests/user-deactivation.test.ts b/web/e2e-tests/user-deactivation.test.ts index 543a791970..8935f9717e 100644 --- a/web/e2e-tests/user-deactivation.test.ts +++ b/web/e2e-tests/user-deactivation.test.ts @@ -1,4 +1,4 @@ -import {strict as assert} from "assert"; +import assert from "node:assert/strict"; import type {Page} from "puppeteer"; diff --git a/web/postcss.config.js b/web/postcss.config.js index ee23f7f171..a5b86e05f8 100644 --- a/web/postcss.config.js +++ b/web/postcss.config.js @@ -1,6 +1,6 @@ "use strict"; -const path = require("path"); +const path = require("node:path"); const {media_breakpoints} = require("./src/css_variables"); diff --git a/web/tests/activity.test.js b/web/tests/activity.test.js index e0843b0551..0f5d2793af 100644 --- a/web/tests/activity.test.js +++ b/web/tests/activity.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const { clear_buddy_list, diff --git a/web/tests/alert_words.test.js b/web/tests/alert_words.test.js index 749ca1c635..9b34011bb6 100644 --- a/web/tests/alert_words.test.js +++ b/web/tests/alert_words.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {set_global, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/alert_words_ui.test.js b/web/tests/alert_words_ui.test.js index e4f1d41f2a..f469e449a5 100644 --- a/web/tests/alert_words_ui.test.js +++ b/web/tests/alert_words_ui.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {$t} = require("./lib/i18n"); const {mock_esm, zrequire} = require("./lib/namespace"); diff --git a/web/tests/blueslip_stacktrace.test.js b/web/tests/blueslip_stacktrace.test.js index e0589c5aeb..b7d57d5bc8 100644 --- a/web/tests/blueslip_stacktrace.test.js +++ b/web/tests/blueslip_stacktrace.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/bot_data.test.js b/web/tests/bot_data.test.js index f4bd9946dd..b177b0c0b4 100644 --- a/web/tests/bot_data.test.js +++ b/web/tests/bot_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/browser_history.test.js b/web/tests/browser_history.test.js index 86f800c1e5..656658ec21 100644 --- a/web/tests/browser_history.test.js +++ b/web/tests/browser_history.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {make_stub} = require("./lib/stub"); diff --git a/web/tests/buddy_data.test.js b/web/tests/buddy_data.test.js index 2a53245c4f..f5b90a0c13 100644 --- a/web/tests/buddy_data.test.js +++ b/web/tests/buddy_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const _ = require("lodash"); diff --git a/web/tests/buddy_list.test.js b/web/tests/buddy_list.test.js index 9501a9e9a0..453a0aceda 100644 --- a/web/tests/buddy_list.test.js +++ b/web/tests/buddy_list.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const _ = require("lodash"); diff --git a/web/tests/channel.test.js b/web/tests/channel.test.js index 1c35740c3f..ef99fa57bb 100644 --- a/web/tests/channel.test.js +++ b/web/tests/channel.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_jquery, mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/color_data.test.js b/web/tests/color_data.test.js index 61e18b222d..ddd27e4d07 100644 --- a/web/tests/color_data.test.js +++ b/web/tests/color_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/common.test.js b/web/tests/common.test.js index c6fe86f9aa..c4318ea489 100644 --- a/web/tests/common.test.js +++ b/web/tests/common.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/components.test.js b/web/tests/components.test.js index f2af52b7f1..9c3a9e38bc 100644 --- a/web/tests/components.test.js +++ b/web/tests/components.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {$t} = require("./lib/i18n"); const {mock_jquery, zrequire} = require("./lib/namespace"); diff --git a/web/tests/compose.test.js b/web/tests/compose.test.js index 74d9867cd9..bd6619428e 100644 --- a/web/tests/compose.test.js +++ b/web/tests/compose.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const MockDate = require("mockdate"); diff --git a/web/tests/compose_actions.test.js b/web/tests/compose_actions.test.js index 52f6b430fb..1fb6731911 100644 --- a/web/tests/compose_actions.test.js +++ b/web/tests/compose_actions.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_banners} = require("./lib/compose_banner"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); diff --git a/web/tests/compose_closed_ui.test.js b/web/tests/compose_closed_ui.test.js index e9803b3151..2da2516946 100644 --- a/web/tests/compose_closed_ui.test.js +++ b/web/tests/compose_closed_ui.test.js @@ -1,7 +1,7 @@ "use strict"; // Setup -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/compose_fade.test.js b/web/tests/compose_fade.test.js index 0fae4c49e4..5d914180e7 100644 --- a/web/tests/compose_fade.test.js +++ b/web/tests/compose_fade.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_jquery, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/compose_pm_pill.test.js b/web/tests/compose_pm_pill.test.js index e6714c8555..bafde72941 100644 --- a/web/tests/compose_pm_pill.test.js +++ b/web/tests/compose_pm_pill.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/compose_state.test.js b/web/tests/compose_state.test.js index ad9ca8659f..15ec7572de 100644 --- a/web/tests/compose_state.test.js +++ b/web/tests/compose_state.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/compose_ui.test.js b/web/tests/compose_ui.test.js index 6c6a20ffe7..d354022746 100644 --- a/web/tests/compose_ui.test.js +++ b/web/tests/compose_ui.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {$t} = require("./lib/i18n"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); diff --git a/web/tests/compose_validate.test.js b/web/tests/compose_validate.test.js index 3b0664ed88..378a032185 100644 --- a/web/tests/compose_validate.test.js +++ b/web/tests/compose_validate.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_banners} = require("./lib/compose_banner"); const {$t} = require("./lib/i18n"); diff --git a/web/tests/compose_video.test.js b/web/tests/compose_video.test.js index 85927dee30..bf61cd8cee 100644 --- a/web/tests/compose_video.test.js +++ b/web/tests/compose_video.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const events = require("./lib/events"); const {mock_esm, set_global, with_overrides, zrequire} = require("./lib/namespace"); diff --git a/web/tests/composebox_typeahead.test.js b/web/tests/composebox_typeahead.test.js index 98e3991bf0..b37050b760 100644 --- a/web/tests/composebox_typeahead.test.js +++ b/web/tests/composebox_typeahead.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_banners} = require("./lib/compose_banner"); const {mock_esm, set_global, with_overrides, zrequire} = require("./lib/namespace"); diff --git a/web/tests/copy_and_paste.test.js b/web/tests/copy_and_paste.test.js index a8263a1b8b..6e5e561600 100644 --- a/web/tests/copy_and_paste.test.js +++ b/web/tests/copy_and_paste.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/deprecated_feature_notice.test.js b/web/tests/deprecated_feature_notice.test.js index 868f1d549d..aaf4be6045 100644 --- a/web/tests/deprecated_feature_notice.test.js +++ b/web/tests/deprecated_feature_notice.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {set_global, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/dispatch.test.js b/web/tests/dispatch.test.js index 5af9ac53c6..b5abe9a027 100644 --- a/web/tests/dispatch.test.js +++ b/web/tests/dispatch.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const events = require("./lib/events"); const {mock_esm, set_global, with_overrides, zrequire} = require("./lib/namespace"); diff --git a/web/tests/dispatch_subs.test.js b/web/tests/dispatch_subs.test.js index 763b744113..75902f12bd 100644 --- a/web/tests/dispatch_subs.test.js +++ b/web/tests/dispatch_subs.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const events = require("./lib/events"); const {mock_esm, zrequire} = require("./lib/namespace"); diff --git a/web/tests/drafts.test.js b/web/tests/drafts.test.js index 43b81e0306..99b10491cb 100644 --- a/web/tests/drafts.test.js +++ b/web/tests/drafts.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_banners} = require("./lib/compose_banner"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); diff --git a/web/tests/echo.test.js b/web/tests/echo.test.js index e200738424..6674b52be1 100644 --- a/web/tests/echo.test.js +++ b/web/tests/echo.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const MockDate = require("mockdate"); diff --git a/web/tests/emoji.test.js b/web/tests/emoji.test.js index 72c54597e4..77149a2ab3 100644 --- a/web/tests/emoji.test.js +++ b/web/tests/emoji.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const events = require("./lib/events"); const {zrequire} = require("./lib/namespace"); diff --git a/web/tests/emoji_picker.test.js b/web/tests/emoji_picker.test.js index e39f93b7da..3b3f650cf9 100644 --- a/web/tests/emoji_picker.test.js +++ b/web/tests/emoji_picker.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const _ = require("lodash"); diff --git a/web/tests/example1.test.js b/web/tests/example1.test.js index 5e959433af..84ca0772fc 100644 --- a/web/tests/example1.test.js +++ b/web/tests/example1.test.js @@ -7,7 +7,7 @@ // The statements below are pretty typical for most node // tests. The reason we need these helpers will hopefully // become clear as you keep reading. -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {make_stream} = require("./lib/example_stream"); const {make_user} = require("./lib/example_user"); diff --git a/web/tests/example2.test.js b/web/tests/example2.test.js index d2c6fe47dd..2b17287fe3 100644 --- a/web/tests/example2.test.js +++ b/web/tests/example2.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {make_stream} = require("./lib/example_stream"); const {make_user} = require("./lib/example_user"); diff --git a/web/tests/example3.test.js b/web/tests/example3.test.js index b95a17d306..6bb30dddde 100644 --- a/web/tests/example3.test.js +++ b/web/tests/example3.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {make_stream} = require("./lib/example_stream"); const {zrequire} = require("./lib/namespace"); diff --git a/web/tests/example4.test.js b/web/tests/example4.test.js index 2eb60c3f94..a6e2be3ae0 100644 --- a/web/tests/example4.test.js +++ b/web/tests/example4.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {make_bot} = require("./lib/example_user"); const {mock_esm, zrequire} = require("./lib/namespace"); diff --git a/web/tests/example5.test.js b/web/tests/example5.test.js index ab5a7ff82c..b2902a6223 100644 --- a/web/tests/example5.test.js +++ b/web/tests/example5.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {make_user} = require("./lib/example_user"); const {mock_esm, zrequire} = require("./lib/namespace"); diff --git a/web/tests/example6.test.js b/web/tests/example6.test.js index b7a3c1f3be..3f2f72936f 100644 --- a/web/tests/example6.test.js +++ b/web/tests/example6.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {make_stub} = require("./lib/stub"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/example7.test.js b/web/tests/example7.test.js index fd0bf29fb9..f621408644 100644 --- a/web/tests/example7.test.js +++ b/web/tests/example7.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {make_stream} = require("./lib/example_stream"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); diff --git a/web/tests/example8.test.js b/web/tests/example8.test.js index fc1fa25208..adba3bd1ba 100644 --- a/web/tests/example8.test.js +++ b/web/tests/example8.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {make_user} = require("./lib/example_user"); const {mock_esm, zrequire} = require("./lib/namespace"); diff --git a/web/tests/fenced_code.test.js b/web/tests/fenced_code.test.js index 35ceecc854..9345a2fa1e 100644 --- a/web/tests/fenced_code.test.js +++ b/web/tests/fenced_code.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/fetch_status.test.js b/web/tests/fetch_status.test.js index 7e25dbd0cf..3e8d410f7f 100644 --- a/web/tests/fetch_status.test.js +++ b/web/tests/fetch_status.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/filter.test.js b/web/tests/filter.test.js index f11dda06d2..396f1632cd 100644 --- a/web/tests/filter.test.js +++ b/web/tests/filter.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {parseOneAddress} = require("email-addresses"); diff --git a/web/tests/fold_dict.test.js b/web/tests/fold_dict.test.js index 95fe420f6a..286f2c9e22 100644 --- a/web/tests/fold_dict.test.js +++ b/web/tests/fold_dict.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/gear_menu_util.test.js b/web/tests/gear_menu_util.test.js index 2f3b82b4c9..459bcfe54d 100644 --- a/web/tests/gear_menu_util.test.js +++ b/web/tests/gear_menu_util.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/hash_util.test.js b/web/tests/hash_util.test.js index 1b03a21187..3aff0ffa19 100644 --- a/web/tests/hash_util.test.js +++ b/web/tests/hash_util.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const message_link_test_cases = require("../../zerver/tests/fixtures/message_link_test_cases"); diff --git a/web/tests/hashchange.test.js b/web/tests/hashchange.test.js index 3c583fad9d..af01eea630 100644 --- a/web/tests/hashchange.test.js +++ b/web/tests/hashchange.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/hotkey.test.js b/web/tests/hotkey.test.js index 116c2f5031..76d927b500 100644 --- a/web/tests/hotkey.test.js +++ b/web/tests/hotkey.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, with_overrides, zrequire} = require("./lib/namespace"); const {make_stub} = require("./lib/stub"); diff --git a/web/tests/i18n.test.js b/web/tests/i18n.test.js index 5b8c14ecfc..f841648a0f 100644 --- a/web/tests/i18n.test.js +++ b/web/tests/i18n.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const _ = require("lodash"); diff --git a/web/tests/input_pill.test.js b/web/tests/input_pill.test.js index 30329113ae..d1298be24f 100644 --- a/web/tests/input_pill.test.js +++ b/web/tests/input_pill.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/internal_url.test.js b/web/tests/internal_url.test.js index a35578d92d..1f4c5a639b 100644 --- a/web/tests/internal_url.test.js +++ b/web/tests/internal_url.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/keydown_util.test.js b/web/tests/keydown_util.test.js index d3a27b7010..62ca616c88 100644 --- a/web/tests/keydown_util.test.js +++ b/web/tests/keydown_util.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/lazy_set.test.js b/web/tests/lazy_set.test.js index daba6ea8de..fdc6c62f43 100644 --- a/web/tests/lazy_set.test.js +++ b/web/tests/lazy_set.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/left_sidebar_navigation_area.test.js b/web/tests/left_sidebar_navigation_area.test.js index e3d6b54f4d..321d449f1c 100644 --- a/web/tests/left_sidebar_navigation_area.test.js +++ b/web/tests/left_sidebar_navigation_area.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/lib/handlebars.js b/web/tests/lib/handlebars.js index c2eecb8a82..d7b7dabe02 100644 --- a/web/tests/lib/handlebars.js +++ b/web/tests/lib/handlebars.js @@ -1,7 +1,7 @@ "use strict"; -const fs = require("fs"); -const path = require("path"); +const fs = require("node:fs"); +const path = require("node:path"); const Handlebars = require("handlebars"); const {SourceMapConsumer, SourceNode} = require("source-map"); diff --git a/web/tests/lib/index.js b/web/tests/lib/index.js index 9bac687625..6e96c379d9 100644 --- a/web/tests/lib/index.js +++ b/web/tests/lib/index.js @@ -1,7 +1,7 @@ "use strict"; -const {strict: assert} = require("assert"); -const path = require("path"); +const assert = require("node:assert/strict"); +const path = require("node:path"); require("css.escape"); require("handlebars/runtime"); diff --git a/web/tests/lib/markdown_assert.js b/web/tests/lib/markdown_assert.js index 1d616ef573..e6678d56a5 100644 --- a/web/tests/lib/markdown_assert.js +++ b/web/tests/lib/markdown_assert.js @@ -22,7 +22,7 @@ * HTML. This makes it easier to spot relevant differences. */ -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {JSDOM} = require("jsdom"); const _ = require("lodash"); diff --git a/web/tests/lib/namespace.js b/web/tests/lib/namespace.js index fe754c578b..017ad96161 100644 --- a/web/tests/lib/namespace.js +++ b/web/tests/lib/namespace.js @@ -1,8 +1,8 @@ "use strict"; -const {strict: assert} = require("assert"); -const Module = require("module"); -const path = require("path"); +const assert = require("node:assert/strict"); +const Module = require("node:module"); +const path = require("node:path"); const callsites = require("callsites"); diff --git a/web/tests/lib/stub.js b/web/tests/lib/stub.js index 3759125909..35241efca0 100644 --- a/web/tests/lib/stub.js +++ b/web/tests/lib/stub.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); // Stubs don't do any magical modifications to your namespace. They // just provide you a function that records what arguments get passed diff --git a/web/tests/lib/zblueslip.js b/web/tests/lib/zblueslip.js index 28caaad675..fc273ec527 100644 --- a/web/tests/lib/zblueslip.js +++ b/web/tests/lib/zblueslip.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); function make_zblueslip() { const lib = {}; diff --git a/web/tests/lib/zjquery.js b/web/tests/lib/zjquery.js index 1503443ad1..841aeaf8db 100644 --- a/web/tests/lib/zjquery.js +++ b/web/tests/lib/zjquery.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); /* When using zjquery, the first call to $("#foo") diff --git a/web/tests/lib/zjquery_element.js b/web/tests/lib/zjquery_element.js index c1b369881f..b3c10db0d9 100644 --- a/web/tests/lib/zjquery_element.js +++ b/web/tests/lib/zjquery_element.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const FakeEvent = require("./zjquery_event"); diff --git a/web/tests/linkifiers.test.js b/web/tests/linkifiers.test.js index fcb56d4e8b..7b27ac388f 100644 --- a/web/tests/linkifiers.test.js +++ b/web/tests/linkifiers.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/list_cursor.test.js b/web/tests/list_cursor.test.js index 66fe198aec..897fc0557e 100644 --- a/web/tests/list_cursor.test.js +++ b/web/tests/list_cursor.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/list_widget.test.js b/web/tests/list_widget.test.js index 0fc4ffd20b..493ab41c95 100644 --- a/web/tests/list_widget.test.js +++ b/web/tests/list_widget.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, mock_jquery, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/markdown.test.js b/web/tests/markdown.test.js index 43e43e86fa..7461c226c7 100644 --- a/web/tests/markdown.test.js +++ b/web/tests/markdown.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const markdown_test_cases = require("../../zerver/tests/fixtures/markdown_test_cases"); diff --git a/web/tests/markdown_parse.test.js b/web/tests/markdown_parse.test.js index 274902fc69..480c8a2070 100644 --- a/web/tests/markdown_parse.test.js +++ b/web/tests/markdown_parse.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const url_template_lib = require("url-template"); diff --git a/web/tests/message_edit.test.js b/web/tests/message_edit.test.js index 8d3dd10ad2..f4b69cd1a9 100644 --- a/web/tests/message_edit.test.js +++ b/web/tests/message_edit.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/message_events.test.js b/web/tests/message_events.test.js index 9d384f602e..ee4b2c5314 100644 --- a/web/tests/message_events.test.js +++ b/web/tests/message_events.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/message_flags.test.js b/web/tests/message_flags.test.js index 9257281128..627ec5701a 100644 --- a/web/tests/message_flags.test.js +++ b/web/tests/message_flags.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, with_overrides, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/message_list.test.js b/web/tests/message_list.test.js index f9e3a92f0d..b0db32ed1d 100644 --- a/web/tests/message_list.test.js +++ b/web/tests/message_list.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {make_stub} = require("./lib/stub"); diff --git a/web/tests/message_list_data.test.js b/web/tests/message_list_data.test.js index 9a4bfac4eb..5aec1f0fed 100644 --- a/web/tests/message_list_data.test.js +++ b/web/tests/message_list_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/message_list_view.test.js b/web/tests/message_list_view.test.js index f93610a8c8..f8edb0078c 100644 --- a/web/tests/message_list_view.test.js +++ b/web/tests/message_list_view.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const _ = require("lodash"); diff --git a/web/tests/message_store.test.js b/web/tests/message_store.test.js index 59784952f3..ef9e7bb87f 100644 --- a/web/tests/message_store.test.js +++ b/web/tests/message_store.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/message_view.test.js b/web/tests/message_view.test.js index 2dcdf965ac..aa313b01dd 100644 --- a/web/tests/message_view.test.js +++ b/web/tests/message_view.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/muted_users.test.js b/web/tests/muted_users.test.js index de08b8a6b3..ab90452ee9 100644 --- a/web/tests/muted_users.test.js +++ b/web/tests/muted_users.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/narrow_activate.test.js b/web/tests/narrow_activate.test.js index ac56292c43..a194a17d93 100644 --- a/web/tests/narrow_activate.test.js +++ b/web/tests/narrow_activate.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/narrow_local.test.js b/web/tests/narrow_local.test.js index 5defbbb50a..b779c74115 100644 --- a/web/tests/narrow_local.test.js +++ b/web/tests/narrow_local.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/narrow_state.test.js b/web/tests/narrow_state.test.js index 101b3591a5..e08adf92f5 100644 --- a/web/tests/narrow_state.test.js +++ b/web/tests/narrow_state.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/narrow_unread.test.js b/web/tests/narrow_unread.test.js index 7e1de5f8e2..24f9fccd91 100644 --- a/web/tests/narrow_unread.test.js +++ b/web/tests/narrow_unread.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/navbar_alerts.test.js b/web/tests/navbar_alerts.test.js index e29a15703b..58e335b2d4 100644 --- a/web/tests/navbar_alerts.test.js +++ b/web/tests/navbar_alerts.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {addDays} = require("date-fns"); diff --git a/web/tests/notifications.test.js b/web/tests/notifications.test.js index b58dc815c2..e50d66d1cd 100644 --- a/web/tests/notifications.test.js +++ b/web/tests/notifications.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/password.test.js b/web/tests/password.test.js index 50f2d5a451..0fac2d0bb7 100644 --- a/web/tests/password.test.js +++ b/web/tests/password.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/peer_data.test.js b/web/tests/peer_data.test.js index dbf2034525..3fe34e353f 100644 --- a/web/tests/peer_data.test.js +++ b/web/tests/peer_data.test.js @@ -6,7 +6,7 @@ glorified wrappers for peer_data functions. */ -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/people.test.js b/web/tests/people.test.js index d86544eb8d..d5037008a6 100644 --- a/web/tests/people.test.js +++ b/web/tests/people.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {parseISO} = require("date-fns"); const _ = require("lodash"); diff --git a/web/tests/people_errors.test.js b/web/tests/people_errors.test.js index e78e649648..98b06ba858 100644 --- a/web/tests/people_errors.test.js +++ b/web/tests/people_errors.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/pill_typeahead.test.js b/web/tests/pill_typeahead.test.js index 16864f2b1f..6bdfd9eb20 100644 --- a/web/tests/pill_typeahead.test.js +++ b/web/tests/pill_typeahead.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire, mock_esm} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/pm_conversations.test.js b/web/tests/pm_conversations.test.js index acb9e77b59..c47863e94a 100644 --- a/web/tests/pm_conversations.test.js +++ b/web/tests/pm_conversations.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/pm_list.test.js b/web/tests/pm_list.test.js index facaca93aa..366774ba57 100644 --- a/web/tests/pm_list.test.js +++ b/web/tests/pm_list.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/pm_list_data.test.js b/web/tests/pm_list_data.test.js index 20b9455b05..451538b48c 100644 --- a/web/tests/pm_list_data.test.js +++ b/web/tests/pm_list_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/poll_widget.test.js b/web/tests/poll_widget.test.js index 867ef792ad..d757bcba2c 100644 --- a/web/tests/poll_widget.test.js +++ b/web/tests/poll_widget.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/popover_menus_data.test.js b/web/tests/popover_menus_data.test.js index 764be29285..85ed6bf7b7 100644 --- a/web/tests/popover_menus_data.test.js +++ b/web/tests/popover_menus_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/postprocess_content.test.js b/web/tests/postprocess_content.test.js index 66e256feec..d6162fa81a 100644 --- a/web/tests/postprocess_content.test.js +++ b/web/tests/postprocess_content.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/presence.test.js b/web/tests/presence.test.js index d90deb0bba..3cc71b1f5e 100644 --- a/web/tests/presence.test.js +++ b/web/tests/presence.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/reactions.test.js b/web/tests/reactions.test.js index bd1eeefc46..48f97989af 100644 --- a/web/tests/reactions.test.js +++ b/web/tests/reactions.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {make_stub} = require("./lib/stub"); diff --git a/web/tests/realm_playground.test.js b/web/tests/realm_playground.test.js index 03055f32ba..97df3950be 100644 --- a/web/tests/realm_playground.test.js +++ b/web/tests/realm_playground.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/recent_senders.test.js b/web/tests/recent_senders.test.js index c13c6055e9..946d0a84f8 100644 --- a/web/tests/recent_senders.test.js +++ b/web/tests/recent_senders.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/recent_view.test.js b/web/tests/recent_view.test.js index d2fb2fa93b..3b75c43bab 100644 --- a/web/tests/recent_view.test.js +++ b/web/tests/recent_view.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/reload.test.js b/web/tests/reload.test.js index c3e7a3998a..42b3e6c873 100644 --- a/web/tests/reload.test.js +++ b/web/tests/reload.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/reload_state.test.js b/web/tests/reload_state.test.js index f8d64cfec1..dd4ad0f8bf 100644 --- a/web/tests/reload_state.test.js +++ b/web/tests/reload_state.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/rendered_markdown.test.js b/web/tests/rendered_markdown.test.js index 00f27a5812..c56751a10d 100644 --- a/web/tests/rendered_markdown.test.js +++ b/web/tests/rendered_markdown.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {$t} = require("./lib/i18n"); const {mock_cjs, mock_esm, zrequire} = require("./lib/namespace"); diff --git a/web/tests/resolved_topic.test.js b/web/tests/resolved_topic.test.js index 3b8fe4730c..84648dd0e4 100644 --- a/web/tests/resolved_topic.test.js +++ b/web/tests/resolved_topic.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/rtl.test.js b/web/tests/rtl.test.js index 0478607acf..c4d61cdbe9 100644 --- a/web/tests/rtl.test.js +++ b/web/tests/rtl.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/saved_snippets.test.js b/web/tests/saved_snippets.test.js index c75bed1b0e..b18397e9f5 100644 --- a/web/tests/saved_snippets.test.js +++ b/web/tests/saved_snippets.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {$t} = require("./lib/i18n"); const {set_global, zrequire} = require("./lib/namespace"); diff --git a/web/tests/scheduled_messages.test.js b/web/tests/scheduled_messages.test.js index eaeea06bf6..48e3596443 100644 --- a/web/tests/scheduled_messages.test.js +++ b/web/tests/scheduled_messages.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/scroll_util.test.js b/web/tests/scroll_util.test.js index 06a0da94cf..04b8d683cc 100644 --- a/web/tests/scroll_util.test.js +++ b/web/tests/scroll_util.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/search.test.js b/web/tests/search.test.js index a5352b42a0..b5749b15c6 100644 --- a/web/tests/search.test.js +++ b/web/tests/search.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/search_suggestion.test.js b/web/tests/search_suggestion.test.js index 5ff8f6bcf2..95e9fa045e 100644 --- a/web/tests/search_suggestion.test.js +++ b/web/tests/search_suggestion.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/server_events.test.js b/web/tests/server_events.test.js index ac7c79d137..63bc233371 100644 --- a/web/tests/server_events.test.js +++ b/web/tests/server_events.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/settings_bots.test.js b/web/tests/settings_bots.test.js index 84d71d4289..6d4567f0be 100644 --- a/web/tests/settings_bots.test.js +++ b/web/tests/settings_bots.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/settings_config.test.js b/web/tests/settings_config.test.js index 9f2f7c2f61..b015d64a1c 100644 --- a/web/tests/settings_config.test.js +++ b/web/tests/settings_config.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/settings_data.test.js b/web/tests/settings_data.test.js index 2cc7dbd713..9b545e2ea5 100644 --- a/web/tests/settings_data.test.js +++ b/web/tests/settings_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/settings_emoji.test.js b/web/tests/settings_emoji.test.js index f47d63f409..735b5189dd 100644 --- a/web/tests/settings_emoji.test.js +++ b/web/tests/settings_emoji.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/settings_muted_users.test.js b/web/tests/settings_muted_users.test.js index dce7b75520..4b3a34ed59 100644 --- a/web/tests/settings_muted_users.test.js +++ b/web/tests/settings_muted_users.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/settings_org.test.js b/web/tests/settings_org.test.js index d2d0708cb9..a4251c1dd4 100644 --- a/web/tests/settings_org.test.js +++ b/web/tests/settings_org.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {$t} = require("./lib/i18n"); const {mock_esm, zrequire, set_global} = require("./lib/namespace"); diff --git a/web/tests/settings_profile_fields.test.js b/web/tests/settings_profile_fields.test.js index f35db95f06..1cf150048f 100644 --- a/web/tests/settings_profile_fields.test.js +++ b/web/tests/settings_profile_fields.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/settings_realm_domains.test.js b/web/tests/settings_realm_domains.test.js index 5b88b4d1f7..5d66952086 100644 --- a/web/tests/settings_realm_domains.test.js +++ b/web/tests/settings_realm_domains.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/settings_user_topics.test.js b/web/tests/settings_user_topics.test.js index 3c14b2b618..6996d65b5d 100644 --- a/web/tests/settings_user_topics.test.js +++ b/web/tests/settings_user_topics.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/spoilers.test.js b/web/tests/spoilers.test.js index aceb593303..eb44cd2d2d 100644 --- a/web/tests/spoilers.test.js +++ b/web/tests/spoilers.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/starred_messages.test.js b/web/tests/starred_messages.test.js index 977afbdbc0..131290f493 100644 --- a/web/tests/starred_messages.test.js +++ b/web/tests/starred_messages.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, with_overrides, zrequire} = require("./lib/namespace"); const {make_stub} = require("./lib/stub"); diff --git a/web/tests/stream_create_subscribers_data.test.js b/web/tests/stream_create_subscribers_data.test.js index f8e9174615..73a549d328 100644 --- a/web/tests/stream_create_subscribers_data.test.js +++ b/web/tests/stream_create_subscribers_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/stream_data.test.js b/web/tests/stream_data.test.js index 495236607c..5b254eaa7f 100644 --- a/web/tests/stream_data.test.js +++ b/web/tests/stream_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/stream_edit.test.js b/web/tests/stream_edit.test.js index a44008201c..1e417fff5d 100644 --- a/web/tests/stream_edit.test.js +++ b/web/tests/stream_edit.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {get_stream_email_address} = require("../src/stream_edit"); diff --git a/web/tests/stream_events.test.js b/web/tests/stream_events.test.js index 2ceba6c010..10980605f8 100644 --- a/web/tests/stream_events.test.js +++ b/web/tests/stream_events.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {make_stub} = require("./lib/stub"); diff --git a/web/tests/stream_list.test.js b/web/tests/stream_list.test.js index 9810c74f98..0afce699b7 100644 --- a/web/tests/stream_list.test.js +++ b/web/tests/stream_list.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/stream_list_sort.test.js b/web/tests/stream_list_sort.test.js index 9687dec210..ef7da886e4 100644 --- a/web/tests/stream_list_sort.test.js +++ b/web/tests/stream_list_sort.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const _ = require("lodash"); diff --git a/web/tests/stream_pill.test.js b/web/tests/stream_pill.test.js index 7183d49f33..83bcf83e90 100644 --- a/web/tests/stream_pill.test.js +++ b/web/tests/stream_pill.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/stream_search.test.js b/web/tests/stream_search.test.js index a079105b04..daf6d79ce5 100644 --- a/web/tests/stream_search.test.js +++ b/web/tests/stream_search.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/stream_settings_ui.test.js b/web/tests/stream_settings_ui.test.js index 7519be4112..a0817bac5f 100644 --- a/web/tests/stream_settings_ui.test.js +++ b/web/tests/stream_settings_ui.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/stream_topic_history.test.js b/web/tests/stream_topic_history.test.js index c6ef56fa00..54317b01af 100644 --- a/web/tests/stream_topic_history.test.js +++ b/web/tests/stream_topic_history.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/submessage.test.js b/web/tests/submessage.test.js index 2742d7b101..bba74bf7be 100644 --- a/web/tests/submessage.test.js +++ b/web/tests/submessage.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/support.test.js b/web/tests/support.test.js index b2588dd2a4..d143d6d7ff 100644 --- a/web/tests/support.test.js +++ b/web/tests/support.test.js @@ -1,8 +1,8 @@ "use strict"; -const {strict: assert} = require("assert"); -const fs = require("fs"); -const path = require("path"); +const assert = require("node:assert/strict"); +const fs = require("node:fs"); +const path = require("node:path"); const {JSDOM} = require("jsdom"); diff --git a/web/tests/templates.test.js b/web/tests/templates.test.js index 36ee1c7c79..fa797be264 100644 --- a/web/tests/templates.test.js +++ b/web/tests/templates.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {run_test} = require("./lib/test"); diff --git a/web/tests/time_zone_util.test.js b/web/tests/time_zone_util.test.js index 2254a7e6a6..2152761017 100644 --- a/web/tests/time_zone_util.test.js +++ b/web/tests/time_zone_util.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/timerender.test.js b/web/tests/timerender.test.js index 1b7b3593d5..43393abdd6 100644 --- a/web/tests/timerender.test.js +++ b/web/tests/timerender.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {add} = require("date-fns"); const MockDate = require("mockdate"); diff --git a/web/tests/topic_generator.test.js b/web/tests/topic_generator.test.js index b93ca3833f..16a3a0c006 100644 --- a/web/tests/topic_generator.test.js +++ b/web/tests/topic_generator.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/topic_link_util.test.js b/web/tests/topic_link_util.test.js index 9c537a5b0d..99a947df23 100644 --- a/web/tests/topic_link_util.test.js +++ b/web/tests/topic_link_util.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/topic_list_data.test.js b/web/tests/topic_list_data.test.js index 3a897bceed..55935768cb 100644 --- a/web/tests/topic_list_data.test.js +++ b/web/tests/topic_list_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const _ = require("lodash"); diff --git a/web/tests/transmit.test.js b/web/tests/transmit.test.js index 2d65b5d96a..450bd40619 100644 --- a/web/tests/transmit.test.js +++ b/web/tests/transmit.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/typeahead.test.js b/web/tests/typeahead.test.js index 2b04dc34ce..c3ea87603d 100644 --- a/web/tests/typeahead.test.js +++ b/web/tests/typeahead.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/typeahead_helper.test.js b/web/tests/typeahead_helper.test.js index e3fbf2fabf..7c982f1a0e 100644 --- a/web/tests/typeahead_helper.test.js +++ b/web/tests/typeahead_helper.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/typing_data.test.js b/web/tests/typing_data.test.js index 7deb309d59..460772d647 100644 --- a/web/tests/typing_data.test.js +++ b/web/tests/typing_data.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {set_global, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/typing_events.test.js b/web/tests/typing_events.test.js index adb2681f21..d0fe89e4c8 100644 --- a/web/tests/typing_events.test.js +++ b/web/tests/typing_events.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/typing_status.test.js b/web/tests/typing_status.test.js index 1d7685591d..1d7ae68d25 100644 --- a/web/tests/typing_status.test.js +++ b/web/tests/typing_status.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/ui_util.test.js b/web/tests/ui_util.test.js index 162298ac1c..3f103c5288 100644 --- a/web/tests/ui_util.test.js +++ b/web/tests/ui_util.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/unread.test.js b/web/tests/unread.test.js index 9957b79291..3533a33be1 100644 --- a/web/tests/unread.test.js +++ b/web/tests/unread.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const _ = require("lodash"); diff --git a/web/tests/upload.test.js b/web/tests/upload.test.js index d7b1a16790..af07bfcba0 100644 --- a/web/tests/upload.test.js +++ b/web/tests/upload.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/user_events.test.js b/web/tests/user_events.test.js index da6c7e0956..3ca913f274 100644 --- a/web/tests/user_events.test.js +++ b/web/tests/user_events.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/user_group_pill.test.js b/web/tests/user_group_pill.test.js index aac3674e3c..d926fd4d51 100644 --- a/web/tests/user_group_pill.test.js +++ b/web/tests/user_group_pill.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/user_groups.test.js b/web/tests/user_groups.test.js index 987050e527..4a53571ef7 100644 --- a/web/tests/user_groups.test.js +++ b/web/tests/user_groups.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/user_pill.test.js b/web/tests/user_pill.test.js index afcfe1eda3..44559d009e 100644 --- a/web/tests/user_pill.test.js +++ b/web/tests/user_pill.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/user_search.test.js b/web/tests/user_search.test.js index 057d9e253d..5ddb61af55 100644 --- a/web/tests/user_search.test.js +++ b/web/tests/user_search.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {set_global, mock_esm, zrequire} = require("./lib/namespace"); const {run_test, noop} = require("./lib/test"); diff --git a/web/tests/user_status.test.js b/web/tests/user_status.test.js index 78cc2b6652..5efd49f91f 100644 --- a/web/tests/user_status.test.js +++ b/web/tests/user_status.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/user_topics.test.js b/web/tests/user_topics.test.js index db40c436f6..af1fc1d29b 100644 --- a/web/tests/user_topics.test.js +++ b/web/tests/user_topics.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {all_visibility_policies} = require("../src/user_topics"); diff --git a/web/tests/user_topics_ui.test.js b/web/tests/user_topics_ui.test.js index 65b4f29b61..b51e87f5e1 100644 --- a/web/tests/user_topics_ui.test.js +++ b/web/tests/user_topics_ui.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/util.test.js b/web/tests/util.test.js index 819912e474..83bd65ee04 100644 --- a/web/tests/util.test.js +++ b/web/tests/util.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const _ = require("lodash"); const MockDate = require("mockdate"); diff --git a/web/tests/vdom.test.js b/web/tests/vdom.test.js index 628986367f..743f5a6e4d 100644 --- a/web/tests/vdom.test.js +++ b/web/tests/vdom.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/watchdog.test.js b/web/tests/watchdog.test.js index 4257bf6d56..d6c5edd70a 100644 --- a/web/tests/watchdog.test.js +++ b/web/tests/watchdog.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const MockDate = require("mockdate"); diff --git a/web/tests/widgetize.test.js b/web/tests/widgetize.test.js index ed5957d36c..d6264a2907 100644 --- a/web/tests/widgetize.test.js +++ b/web/tests/widgetize.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {mock_esm, set_global, zrequire} = require("./lib/namespace"); const {run_test} = require("./lib/test"); diff --git a/web/tests/zblueslip.test.js b/web/tests/zblueslip.test.js index 32495fec55..79e7a68f6f 100644 --- a/web/tests/zblueslip.test.js +++ b/web/tests/zblueslip.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {run_test} = require("./lib/test"); const blueslip = require("./lib/zblueslip"); diff --git a/web/tests/zjquery.test.js b/web/tests/zjquery.test.js index 022457e6c5..df14a23dbd 100644 --- a/web/tests/zjquery.test.js +++ b/web/tests/zjquery.test.js @@ -1,6 +1,6 @@ "use strict"; -const {strict: assert} = require("assert"); +const assert = require("node:assert/strict"); const {run_test} = require("./lib/test"); const $ = require("./lib/zjquery"); diff --git a/web/webpack.config.ts b/web/webpack.config.ts index 9c8a79526e..cf09685012 100644 --- a/web/webpack.config.ts +++ b/web/webpack.config.ts @@ -1,6 +1,6 @@ /// -import path from "path"; +import path from "node:path"; import type {ZopfliOptions} from "@gfx/zopfli"; import {gzip} from "@gfx/zopfli";