"use strict"; const {strict: assert} = require("assert"); const {JSDOM} = require("jsdom"); const {set_global, zrequire} = require("../zjsunit/namespace"); const {run_test} = require("../zjsunit/test"); set_global("DOMParser", new JSDOM().window.DOMParser); zrequire("templates"); run_test("and", () => { const args = { last: true, }; const html = require("./templates/and.hbs")(args); assert.equal(html, "

empty and

\n

last and

\n\n"); }); run_test("or", () => { const args = { last: true, }; const html = require("./templates/or.hbs")(args); assert.equal(html, "\n

last or

\n

true or

\n"); }); run_test("rendered_markdown", () => { const html = require("./templates/rendered_markdown.hbs")(); const expected_html = 'good\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"); });