Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
zjsunit: Remove stub_templates helper.
Steve Howell398cdbd9229c
diff --git a/frontend_tests/zjsunit/handlebars.js b/frontend_tests/zjsunit/handlebars.jsindex 5340be008f0..0dea4f96442 100644--- a/frontend_tests/zjsunit/handlebars.js+++ b/frontend_tests/zjsunit/handlebars.js@@ -6,14 +6,6 @@ const path = require("path");const Handlebars = require("handlebars");const {SourceMapConsumer, SourceNode} = require("source-map");-const templates_path = path.resolve(__dirname, "../../static/templates");--exports.stub_templates = (stub) => {- // THIS FUNCTION IS HIGHLY DEPRECATED!!!- // DEPRECATION NOTICE: use mock_template instead- window.template_stub = stub;-};-const hb = Handlebars.create();class ZJavaScriptCompiler extends hb.JavaScriptCompiler {@@ -32,7 +24,6 @@ hb.JavaScriptCompiler = ZJavaScriptCompiler;function compile_hbs(module, filename) {const code = fs.readFileSync(filename, "utf-8");- const name = path.relative(templates_path, filename).slice(0, -".hbs".length);const pc = hb.precompile(code, {preventIndent: true, srcName: filename});const node = new SourceNode();node.add([@@ -41,11 +32,6 @@ function compile_hbs(module, filename) {SourceNode.fromStringWithSourceMap(pc.code, new SourceMapConsumer(pc.map)),");\n","module.exports = (...args) => {\n",- " if (window.template_stub !== undefined) {\n",- " return window.template_stub(",- JSON.stringify(name),- ", ...args);\n",- " }\n"," return template(...args);\n","};\n",]);