[IMP] components: crash when using unknown suffix/modifiers

This commit is contained in:
Géry Debongnie
2022-01-19 11:35:34 +01:00
committed by aab-odoo
parent f7843c7c00
commit b06791c950
4 changed files with 35 additions and 5 deletions
+8
View File
@@ -480,6 +480,14 @@ describe("t-on", () => {
button.click();
});
test("t-on crashes when used with unknown modifier", async () => {
const template = `<div t-on-click.somemodifier="onClick" />`;
let owner = { onClick(e: Event) {} };
expect(() => mountToFixture(template, owner)).toThrowError("Unknown event modifier");
});
test("t-on combined with t-esc", async () => {
expect.assertions(3);
const template = `<div><button t-on-click="onClick" t-esc="text"/></div>`;