[REF] hooks: better implementation of onMounted/onWillUnmount

This commit is contained in:
Géry Debongnie
2019-09-28 21:11:32 +02:00
parent 090880f478
commit f6820bb8ac
4 changed files with 23 additions and 14 deletions
+2
View File
@@ -61,6 +61,8 @@ describe("hooks", () => {
}
const component = new MyComponent(env);
await component.mount(fixture);
expect(component).not.toHaveProperty("mounted");
expect(component).not.toHaveProperty("willUnmount");
expect(fixture.innerHTML).toBe("<div>hey</div>");
expect(steps).toEqual(["mounted"]);
component.unmount();