mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] parser: normalize document before parsing
This commit is contained in:
committed by
Aaron Bohy
parent
2943ca3921
commit
6459d8d289
@@ -1259,8 +1259,14 @@ describe("qweb parser", () => {
|
||||
});
|
||||
|
||||
test("component with t-esc", async () => {
|
||||
expect(() => parse(`<MyComponent t-esc="someValue"/>`)).toThrow(
|
||||
"t-esc is not supported on Component nodes"
|
||||
expect(parse(`<MyComponent t-esc="someValue"/>`)).toEqual(
|
||||
parse(`<MyComponent><t t-esc="someValue"/></MyComponent>`)
|
||||
);
|
||||
});
|
||||
|
||||
test("component with t-esc and content", async () => {
|
||||
expect(() => parse(`<MyComponent t-esc="someValue">Some content</MyComponent>`)).toThrow(
|
||||
"Cannot have t-esc on a component that already has content"
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user