Skip to content

Support cleaning up wrappers automagically #1236

Closed
@ghost

Description

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 as afterEach() to call wrapper.destroy() as callback.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions