This commit is contained in:
Géry Debongnie
2021-11-19 08:31:19 +01:00
parent d8201b8955
commit 9c2523e3ce
3 changed files with 50 additions and 2 deletions
+24
View File
@@ -83,4 +83,28 @@ describe("rendering semantics", () => {
expect(parentN).toBe(2);
expect(childN).toBe(2);
});
test("blabla", async () => {
class Child extends Component {
static template = xml`<t t-esc="props.a.b"/>`;
}
class Parent extends Component {
static template = xml`
<Child a="state"/>
`;
static components = { Child };
state = useState({ b: 1 });
}
const parent = await mount(Parent, fixture);
expect(fixture.innerHTML).toBe("1");
parent.state.b = 3;
await nextTick();
expect(fixture.innerHTML).toBe("3");
});
});