[REF] component: remove onDestroyed, implement onWillDestroy

This commit is contained in:
Géry Debongnie
2021-11-29 14:06:53 +01:00
committed by Aaron Bohy
parent 8c600fa539
commit 779003e715
10 changed files with 83 additions and 117 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
import {
App,
Component,
onDestroyed,
onWillDestroy,
onMounted,
onPatched,
onWillRender,
@@ -210,9 +210,9 @@ export function useLogLifecycle() {
logStep(`${name}:willUnmount`);
});
onDestroyed(() => {
expect(name + ": " + status(component)).toBe(name + ": " + "destroyed");
logStep(`${name}:destroyed`);
onWillDestroy(() => {
expect(status(component)).not.toBe("destroyed");
logStep(`${name}:willDestroy`);
});
}