Skip to content

epic: shallow: true mounting option (previously shallowMount) #6

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
lmiller1990 opened this issue Feb 20, 2020 · 0 comments · Fixed by #107
Closed

epic: shallow: true mounting option (previously shallowMount) #6

lmiller1990 opened this issue Feb 20, 2020 · 0 comments · Fixed by #107
Labels

Comments

@lmiller1990
Copy link
Member

lmiller1990 commented Feb 20, 2020

Will probably rely on #3. I have some ideas on how to handle this.

Instead of shallowMount, I think we should have a shallow mounting option (discussed internally).

const Comp = mount({
  shallow: true
})

How this should work

shallowMount was pretty buggy in VTU beta. It should completely stub out and child components. So:

<template>
  <div>Content</div>
  <Foo />
  <Bar>
    <div>BAR</div>
  </Bar>
</template>

Should render as follows when using shallow:

<div>Content</div>
<foo-stub />
<bar-stub />

Whether it's <FooStub /> or <foo-stub> /> doesn't matter, the point is that the components are no longer rendered, nor is any of their code executed.

Things to consider:

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

Successfully merging a pull request may close this issue.

1 participant