mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] components: add test for template string in props
This commit is contained in:
committed by
Aaron Bohy
parent
4866ed8e8a
commit
2943ca3921
@@ -158,4 +158,21 @@ describe("basics", () => {
|
||||
}
|
||||
await mount(Parent, fixture);
|
||||
});
|
||||
|
||||
test("template string in prop", async () => {
|
||||
expect.assertions(3);
|
||||
class Child extends Component {
|
||||
static template = xml``;
|
||||
setup() {
|
||||
expect(this.props.propName).toBe("123");
|
||||
}
|
||||
}
|
||||
|
||||
class Parent extends Component {
|
||||
static template = xml({ raw: ['<Child propName="`1${someVal}3`"/>'] });
|
||||
static components = { Child };
|
||||
someVal = 2;
|
||||
}
|
||||
await mount(Parent, fixture);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user