[FIX] component: remove stale fiber in scheduler

Owl takes care of not rendering a component that will be unmounted
immediately after, and it works.  However, it also should clean
up the newly added fiber.
This commit is contained in:
Géry Debongnie
2019-11-20 10:43:46 +01:00
committed by aab-odoo
parent f44b9a38ae
commit 7749fd3b96
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -5052,6 +5052,8 @@ describe("unmounting and remounting", () => {
await nextTick(); // wait for changes to be detected before remounting
await widget.mount(fixture);
expect(fixture.innerHTML).toBe("<div>3</div>");
// we want to make sure that there are no remaining tasks left at this point.
expect(Component.scheduler.tasks.length).toBe(0);
});
test("sub component is still active after being unmounted and remounted", async () => {