Skip to content

Add depth option to shallowMount #867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eddyerburgh opened this issue Jul 29, 2018 · 4 comments
Closed

Add depth option to shallowMount #867

eddyerburgh opened this issue Jul 29, 2018 · 4 comments

Comments

@eddyerburgh
Copy link
Member

eddyerburgh commented Jul 29, 2018

What problem does this feature solve?

Enable shallowMounting more than 1 level deep

What does the proposed API look like?

shallowMount(TestComponent, {
  depth: 2
})
@trollepierre
Copy link
Contributor

this feature will help us a lot with performance: #892
I believe: being able to only shallowMount component instead of mount will help us a lot. ^^

@hewIngram
Copy link
Contributor

@eddyerburgh - did you have an idea of how you wanted to implement this? Happy to have a look at picking it up if you haven't.

I guess we just want to pass the depth value down to the patchRenderMixin and make createElement respect it?

@eddyerburgh
Copy link
Member Author

eddyerburgh commented Mar 12, 2019

I haven't looked at this recently, but something like that sounds good 👍

@lmiller1990
Copy link
Member

After discussion, we will not be implementing this.

If you have are having perf problems, use stubs to stub out the heavy components.

If you are having really serious perf problems you absolutely cannot solve, send me a message on Vueland and I will help you make your tests faster to the best of my ability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants