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.

zjsunit: Remove unnecessary Handlebars wrapper function.

Anders Kaseorga9320accdc70
diff --git a/frontend_tests/zjsunit/handlebars.js b/frontend_tests/zjsunit/handlebars.js
index 0dea4f96442..24af22f2a47 100644
--- a/frontend_tests/zjsunit/handlebars.js
+++ b/frontend_tests/zjsunit/handlebars.js
@@ -28,12 +28,9 @@ function compile_hbs(module, filename) {
const node = new SourceNode();
node.add([
'const Handlebars = require("handlebars/runtime");\n',
- "const template = Handlebars.template(",
+ "module.exports = Handlebars.template(",
SourceNode.fromStringWithSourceMap(pc.code, new SourceMapConsumer(pc.map)),
");\n",
- "module.exports = (...args) => {\n",
- " return template(...args);\n",
- "};\n",
]);
const out = node.toStringWithSourceMap();
module._compile(