template.js: Add test for "numberFormat" helper.

This commit is contained in:
YashRE42 2021-03-21 12:43:11 +00:00 committed by Tim Abbott
parent 6c0d070b4d
commit 4988f60a0f
2 changed files with 10 additions and 0 deletions

View File

@ -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");
});

View File

@ -0,0 +1 @@
{{numberFormat number}}