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

This commit is contained in:
YashRE42 2021-03-21 12:29:44 +00:00 committed by Tim Abbott
parent 66c12c9022
commit 2e910842d8
2 changed files with 12 additions and 0 deletions

View File

@ -15,3 +15,12 @@ run_test("and", () => {
const html = require("./templates/and.hbs")(args);
assert.equal(html, "<p>empty and</p>\n<p>last and</p>\n\n");
});
run_test("or", () => {
const args = {
last: true,
};
const html = require("./templates/or.hbs")(args);
assert.equal(html, "\n<p>last or</p>\n<p>true or</p>\n");
});

View File

@ -0,0 +1,3 @@
{{#if (or)}}<p>empty or</p>{{/if}}
{{#if (or false last)}}<p>last or</p>{{/if}}
{{#if (or true false)}}<p>true or</p>{{/if}}