mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] components: crash when using unknown suffix/modifiers
This commit is contained in:
@@ -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>`;
|
||||
|
||||
Reference in New Issue
Block a user