add test to make sure we can load templates with empty str

This commit is contained in:
Géry Debongnie
2019-03-06 09:07:56 +01:00
parent a162e40fe0
commit d1df2d53c3
+6
View File
@@ -767,4 +767,10 @@ describe("loading templates", () => {
const result = renderToString(qweb, "main");
expect(result).toBe("<ul><li>ok</li><li>foo</li></ul>");
});
test("does not crash if string does not have templates", () => {
const data = "";
qweb.loadTemplates(data);
expect(qweb.processedTemplates).toEqual({});
});
});