mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
add test to make sure we can load templates with empty str
This commit is contained in:
@@ -767,4 +767,10 @@ describe("loading templates", () => {
|
|||||||
const result = renderToString(qweb, "main");
|
const result = renderToString(qweb, "main");
|
||||||
expect(result).toBe("<ul><li>ok</li><li>foo</li></ul>");
|
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({});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user