You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is necessary to call wrapper.destroy() / wrapper.vm.$destroy() manually. Forgetting to do so may result in difficult to track down side effects and performance degradation (especially when not mocking Vuex).
What does the proposed API look like?
Introduce a new enableAutoDestroy() helper which accepts a hook function such as afterEach() to call wrapper.destroy() as callback.
The text was updated successfully, but these errors were encountered:
As I realized from @souldzin's comment on the pull request (#1240 (comment)), the API proposed here does not work. For a hook like afterEach we want to make sure it is only called exactly once. I'm not sure how we would ensure that when passing it as an config option.
Instead we could provide an enableAutoDestroy() function that accepts the hook function as parameter. We could then rely on that function being called only once (in test setup).
Uh oh!
There was an error while loading. Please reload this page.
What problem does this feature solve?
Currently it is necessary to call
wrapper.destroy()
/wrapper.vm.$destroy()
manually. Forgetting to do so may result in difficult to track down side effects and performance degradation (especially when not mocking Vuex).What does the proposed API look like?
Introduce a new
enableAutoDestroy()
helper which accepts a hook function such asafterEach()
to callwrapper.destroy()
as callback.The text was updated successfully, but these errors were encountered: