Skip to content
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

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

Open
lmiller1990 opened this issue Feb 13, 2020 · 0 comments
Open

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

lmiller1990 opened this issue Feb 13, 2020 · 0 comments

Comments

@lmiller1990
Copy link
Owner

Will probably rely on #9

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:

@lmiller1990 lmiller1990 changed the title feat: shallow: true mounting option epic: shallow: true mounting option (previously shallowMount) Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant