mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
throw qweb error if invalid loop in t-foreach
This commit is contained in:
@@ -545,6 +545,14 @@ describe("foreach", () => {
|
||||
renderToString(qweb, "test", context);
|
||||
expect(Object.keys(context).length).toBe(0);
|
||||
});
|
||||
|
||||
test("throws error if invalid loop expression", () => {
|
||||
qweb.addTemplate(
|
||||
"test",
|
||||
`<div><t t-foreach="abc" t-as="item"><span/></t></div>`
|
||||
);
|
||||
expect(() => qweb.render("test")).toThrow("Invalid loop expression");
|
||||
});
|
||||
});
|
||||
|
||||
describe("misc", () => {
|
||||
|
||||
Reference in New Issue
Block a user