Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
zjsunit: Clear require cache also for templates.
Abhijeet Prasad Bodas09f8a8ec2b48
diff --git a/frontend_tests/zjsunit/namespace.js b/frontend_tests/zjsunit/namespace.jsindex 5e16a41e187..54099ae0b64 100644--- a/frontend_tests/zjsunit/namespace.js+++ b/frontend_tests/zjsunit/namespace.js@@ -148,7 +148,6 @@ exports.zrequire = function (short_fn) {};const staticPath = path.resolve(__dirname, "../../static") + path.sep;-const templatesPath = staticPath + "templates" + path.sep;exports.complain_about_unused_mocks = function () {for (const filename of module_mocks.keys()) {@@ -177,7 +176,7 @@ exports.finish = function () {used_module_mocks.clear();for (const path of Object.keys(require.cache)) {- if (path.startsWith(staticPath) && !path.startsWith(templatesPath)) {+ if (path.startsWith(staticPath)) {delete require.cache[path];}}