Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
template.js: Add test for "numberFormat" helper.
YashRE424988f60a0fc8
diff --git a/frontend_tests/node_tests/templates.js b/frontend_tests/node_tests/templates.jsindex e76b495929c..860e74c2444 100644--- a/frontend_tests/node_tests/templates.js+++ b/frontend_tests/node_tests/templates.js@@ -34,3 +34,12 @@ run_test("rendered_markdown", () => {'<a href="http://example.com" target="_blank" rel="noopener noreferrer" title="http://example.com/">good</a>\n';assert.equal(html, expected_html);});++run_test("numberFormat", () => {+ const args = {+ number: 1000000,+ };++ const html = require("./templates/numberFormat.hbs")(args);+ assert.equal(html, "1,000,000\n");+});diff --git a/frontend_tests/node_tests/templates/numberFormat.hbs b/frontend_tests/node_tests/templates/numberFormat.hbsnew file mode 100644index 00000000000..6bac666ff1a--- /dev/null+++ b/frontend_tests/node_tests/templates/numberFormat.hbs@@ -0,0 +1 @@+{{numberFormat number}}