fix: make sure qweb throw error if invalid templates

This commit is contained in:
Géry Debongnie
2019-03-29 15:37:42 +01:00
parent 5cd45b59af
commit e6b0d06e3e
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -101,6 +101,12 @@ describe("error handling", () => {
qweb.addTemplate("test", `<t></t>`);
expect(() => qweb.addTemplate("test", "<div/>")).toThrow("already defined");
});
test("loadTemplates throw if parser error", () => {
expect(() => {
qweb.loadTemplates("<templates><abc>></templates>");
}).toThrow("Invalid XML in template");
});
});
describe("t-esc", () => {