mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
template.js: Add test for "or" helper.
This commit is contained in:
@@ -15,3 +15,12 @@ run_test("and", () => {
|
|||||||
const html = require("./templates/and.hbs")(args);
|
const html = require("./templates/and.hbs")(args);
|
||||||
assert.equal(html, "<p>empty and</p>\n<p>last and</p>\n\n");
|
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");
|
||||||
|
});
|
||||||
|
|||||||
3
frontend_tests/node_tests/templates/or.hbs
Normal file
3
frontend_tests/node_tests/templates/or.hbs
Normal 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}}
|
||||||
Reference in New Issue
Block a user