Closed
Description
What problem does this feature solve?
This gives further explanation about how mount
and shallowMount
behave in conjunction with test runners, clarifying expectations for developers about how their component will be treated during and after each test.
I recently encountered a scenario where an intermittent test timeout occurred due to a setInterval
created in the mounted
hook, expecting the component to be destroyed (and the interval subsequently cleared) by vue-test-utils at the end of the spec.
What does the proposed API look like?
This is a simple addition to the common-tips
section of the test utils docs with an example. I propose that the lifecycle hooks that can be expected to run automatically during each spec be elaborated on briefly after the "Shallow Rendering" section.
Metadata
Metadata
Assignees
Labels
No labels