load widget templates separately (so no more inline)

This commit is contained in:
Géry Debongnie
2019-02-02 11:41:19 +01:00
parent 4d30180862
commit 27f5845799
19 changed files with 177 additions and 183 deletions
+5
View File
@@ -89,6 +89,11 @@ describe("error handling", () => {
test("nice warning if no template with given name", () => {
expect(() => qweb.render("invalidname")).toThrow("does not exist");
});
test("cannot add twice the same template", () => {
qweb.addTemplate("test", `<t></t>`);
expect(() => qweb.addTemplate("test", "<div/>")).toThrow("already defined");
});
});
describe("t-esc", () => {