Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

node test runner: Prevent Handlebars quirks.

Steve Howellb87d64cd8aaf
diff --git a/web/tests/i18n.test.cjs b/web/tests/i18n.test.cjs
index 619d4d9d74a..2f934843e70 100644
--- a/web/tests/i18n.test.cjs
+++ b/web/tests/i18n.test.cjs
@@ -20,10 +20,6 @@ page_params.translation_data = {
"<p>Le canal <b>{name}</b> n'existe pas.</p><p>Gérez vos abonnements <z-link>sur votre page canaux</z-link>.</p>",
};
-// Re-register Zulip extensions so extensions registered previously with
-// mocked i18n.ts do not interfere with following tests.
-require("../src/templates.ts");
-
// All of our other tests stub out i18n activity;
// here we do a quick sanity check on the engine itself.
// `i18n.ts` initializes FormatJS and is imported by
diff --git a/web/tests/lib/index.cjs b/web/tests/lib/index.cjs
index afd7f9cd588..eeeeb636d0c 100644
--- a/web/tests/lib/index.cjs
+++ b/web/tests/lib/index.cjs
@@ -128,6 +128,9 @@ test.set_verbose(files.length === 1);
namespace.mock_esm("../../src/page_params", zpage_params);
require("../../src/page_params.ts");
+ // Make sure we re-register our Handlebars helpers.
+ require("../../src/templates.ts");
+
try {
await run_one_module(file);
blueslip.reset();