+
+ `;
+
+ static components = { Wrapper };
+
+ setup() {
+ dialog = this;
+ }
+
+ onClick(ev) {
+ // we do not use expect(this).toBe(dialog) here because if it fails, it
+ // may blow up jest because it then tries to compute a diff, which is
+ // infinite if there is a cycle
+ expect(this === dialog).toBe(true);
+ }
+ }
+
+ class Parent extends Component {
+ static template = xml`
+ `;
+ static components = { Dialog };
+ }
+
+ await mount(Parent, { target: fixture });
+
+ document.querySelector("button").click();
+ await nextTick();
+ });
});